bynk.parse.expected_capability_op
Error Expected a capability operation.
A capability body is a list of operations, each a signature that starts with fn: the capability says what can be done, and a provider supplies how. The parser found something else where the next operation should begin. The commonest cause is leaving off the fn. An on handler, a type or a let does not belong in a capability either. The message names the token it found, and the position is where the operation should have started. A provider body has the same rule: bynk.parse.expected_provider_op.
Example
capability Clock { now() -> Effect[Int] // ✗ an operation starts with `fn`}
capability Clock { fn now() -> Effect[Int] // ✓}In the Book
See also
- The grammar rule it governs:
capability_op. - Every code in its category, Parser, on the diagnostic index.
bynk explain bynk.parse.expected_capability_opshows the same from the installed toolchain, without a network.