bynk.val.arity
Error Val[T] was given the wrong number of pin arguments.
Val[T] takes at most one argument, the pin: Val[Age] lets the compiler choose a value, Val[Age](20) fixes it. Val makes one value of one type, so a second argument has no meaning. Pass one pin or none.
Example
type Age = Int where InRange(0, 150)
// tests/ages.test.bynklet a = Val[Age](20, 30) // ✗ two pinslet a = Val[Age](20) // ✓ oneIn 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.arityshows the same from the installed toolchain, without a network.