Skip to content
Playground(another site)

bynk.cell.invalid_target

Error A := write targets something that is not a store Cell field.

A := replaces the value of a Cell, the one store kind that holds a single value. A Set, Map, Log or Cache has no one value to replace; each changes through its own operations (add, put, append), and a name that is not a store field of the agent has nothing to write. Use the operation the field's kind offers, or declare the field Cell[T] if a single replaceable value is what you want. The same check covers a migrate from step that assigns a field.

Example

store ids: Set[Int]
ids := n // ✗ a `Set` has no single value to replace
let _ <- ids.add(n) // ✓ the operation the kind offers

In the Book

See also

  • Every code in its category, Other, on the diagnostic index.
  • bynk explain bynk.cell.invalid_target shows the same from the installed toolchain, without a network.