Skip to content
Playground(another site)

bynk.resolve.name_conflict

Error Two declarations share a name.

Two declarations of different kinds share a name. A unit's functions, assets, embeds, constants, types and events, services, agents and providers with a body (by their implementation name) all live in one namespace, across all of the unit's files, because they are one scope in the emitted module. Capabilities and actors each keep their own. Two types, or a type and an event, are bynk.resolve.duplicate_type, and two constants bynk.resolve.duplicate_const. Rename one of the two.

Example

fn Limit() -> Int {
3
}
const Limit: Int = 3 // ✗ a function already has this name
const Limit: Int = 3 // ✓ once the function is renamed `limit`

In the Book

See also

  • Every code in its category, Resolution, on the diagnostic index.
  • bynk explain bynk.resolve.name_conflict shows the same from the installed toolchain, without a network.