bynk.store.annotation_kind_mismatch
Error A storage annotation is used on a kind it does not apply to (e.g. @ttl on a Map).
Each storage annotation is for one kind of store: @ttl for a Cache, @retain for a Log and @indexed for a Map. On any other kind it has nothing to act on: a Map has no expiry, for one. Move the annotation to a field of the kind it belongs to, or change the field's kind if that is what you meant.
Example
store sessions: Map[String, Int] @ttl(30.minutes) // ✗ `@ttl` is for a `Cache`
store sessions: Cache[String, Int] @ttl(30.minutes) // ✓In the Book
See also
- Every code in its category, Agent storage, on the diagnostic index.
bynk explain bynk.store.annotation_kind_mismatchshows the same from the installed toolchain, without a network.