bynk.generics.bound_on_capability_op
Error A generic capability operation's type parameter carries a bound other than Key or Codable; operations take only those two (constrained-generics slices 2 and 3).
A capability operation is carried out by its provider, written in TypeScript, so it has no Bynk body for a bound to serve; an Ord bound would also add a hidden comparator argument. Only Key and Codable are accepted, and both are handled at the call site. Remove the bound, and compare in the code that calls the operation.
Example
capability Registry { fn lookup[K: Key + Ord](key: K) -> Effect[Option[String]] // ✗ only `Key` and `Codable`}
capability Registry { fn lookup[K: Key](key: K) -> Effect[Option[String]] // ✓}In the Book
See also
- The grammar rule it governs:
capability_op. - Every code in its category, Generics, on the diagnostic index.
bynk explain bynk.generics.bound_on_capability_opshows the same from the installed toolchain, without a network.