Skip to content
Playground(another site)

bynk.consumes.alias_conflict

Error Two consumes aliases collide.

consumes payment as Pay gives a context one name to call a unit by, and a name for one unit. Two clauses with the same alias, a unit consumed under two aliases, or an alias that is also a type, function, capability, service or agent of this context, would leave a call such as Pay.charge(…) with no single meaning. Give each clause its own alias, or drop it. The same clause in another file of the context is fine.

Example

shop.bynk
context shop
consumes payment as Pay
consumes shipping as Pay // ✗ `Pay` already names `payment`
consumes payment as Pay
consumes shipping as Ship // ✓ one name each

In the Book

See also

  • The grammar rule it governs: consumes_decl.
  • Every code in its category, Consumes, on the diagnostic index.
  • bynk explain bynk.consumes.alias_conflict shows the same from the installed toolchain, without a network.