Skip to content
Playground(another site)

bynk.exports.duplicate_export

Error The same name is exported more than once.

A type or capability is exported once. Naming it again in a second exports clause with the same visibility adds nothing, and usually means a clause was pasted twice, or a name was meant for another one. Delete the repeat. Within a single clause the repeat is bynk.exports.duplicate_in_clause, and the same type under both opaque and transparent is bynk.exports.conflicting_visibility.

Example

exports transparent { Order }
exports transparent { Order } // ✗ already exported above
type Order = { total: Int }
exports transparent { Order } // ✓ exported once

In the Book

See also

  • The grammar rule it governs: exports_decl.
  • Every code in its category, Exports, on the diagnostic index.
  • bynk explain bynk.exports.duplicate_export shows the same from the installed toolchain, without a network.