Skip to content
Playground(another site)

bynk.agent.replaces_live

Error agent New replaces Old names an Old that is still declared; a rename moves the old class's data to the new one.

agent New replaces Old renames a class: Old's stored data moves to New. While Old is still declared, both would claim that data, so it is refused. To rename, delete the Old declaration. If the two are separate classes, drop replaces. Each old name has one fate, as bynk.agent.class_conflict says.

Example

agent Cart { … }
agent Basket replaces Cart { … } // ✗ `Cart` is still declared
agent Basket { … } // ✓ a separate class; delete `Cart` to rename it

In the Book

See also

  • Every code in its category, Agents, on the diagnostic index.
  • bynk explain bynk.agent.replaces_live shows the same from the installed toolchain, without a network.