Skip to content
Playground(another site)

bynk.store.unknown_map_accessor

Error A store Map field access is not one of its query accessors (entries/keys/values).

A store Map field is read as a lazy query through exactly three accessors: .entries (each a MapEntry with .key and .value), .keys and .values. Any other name after the field is refused. Its effectful operations, such as put and get, are method calls, not accessors. Use one of the three, or call an operation. A wrong method name on a store is bynk.store.unknown_op.

Example

store items: Map[String, Item]
items.names.collect() // ✗ a `Map` has no `.names`
items.keys.collect() // ✓ the keys, as a query

In the Book

See also

  • Every code in its category, Agent storage, on the diagnostic index.
  • bynk explain bynk.store.unknown_map_accessor shows the same from the installed toolchain, without a network.