bynk.val.pin_unsupported
Error A pin was given for a type kind that does not support pinning.
A pinned Val[T](lit) is accepted only for a refined type, where the literal is checked against the refinement. A sum, record or opaque type takes no pin, so one is refused. Use bare Val[T], which builds the first variant, or every field, itself, or construct the value directly with a variant or a record literal. A pin that is not a literal at all is bynk.val.pin_not_literal.
Example
let s = Val[Status](1) // ✗ `Status` is a sumlet s = Val[Status] // ✓ bare `Val` picks the first variantIn the Book
- Testing › Val[T] — value fabrication
- Testing › @example — a value for a pattern
- Testing
- Write tests, stub collaborators, and pin a `Val[T]`
See also
- The grammar rule it governs:
val_expr. - Every code in its category, Value fabrication, on the diagnostic index.
bynk explain bynk.val.pin_unsupportedshows the same from the installed toolchain, without a network.