bynk.capability.op_arity
Error A capability operation was called with the wrong number of arguments.
A call to a capability operation passes exactly the parameters its declaration lists, so Clock.now(1) against fn now() -> Effect[Int] has one argument too many. Pass the declared number of arguments. If the operation really needs another parameter, add it to the capability's declaration and to every provider of it.
Example
capability Clock { fn now() -> Effect[Int]}
Clock.now(1) // ✗ `now` takes no argumentsClock.now() // ✓In the Book
See also
- The grammar rule it governs:
capability_decl. - Every code in its category, Capabilities, on the diagnostic index.
bynk explain bynk.capability.op_arityshows the same from the installed toolchain, without a network.