Skip to content
Playground(another site)

bynk.consumes.type_alias_conflict

Error A consumes U { T as Alias } alias collides with a type or value in scope, or with another alias.

An alias is a name in this context, so it cannot be one that is already taken: by another alias, by a type or function the context declares or brings in with uses, or by a capability. Give each aliased type a name of its own. A consumed type that is not aliased, and clashes with one of these, is bynk.consumes.name_conflict.

Example

shop.bynk
context shop
consumes payment { AuthId as Id, Receipt as Id } // ✗ `Id` already names `AuthId`
consumes payment { AuthId as Id, Receipt as ReceiptId } // ✓ distinct aliases

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.type_alias_conflict shows the same from the installed toolchain, without a network.