Skip to content
Playground(another site)

bynk.parse.expected_visibility

Error Expected a visibility keyword.

An exports clause says how consumers may use what it lists, so it needs a visibility: exports opaque { … } keeps a type's shape private to its context, exports transparent { … } shows it, and exports capability { … } offers a capability. A bare exports { … } is refused: the choice decides what other units can rely on, so it is written out. Pick one.

Example

exports { P } // ✗ no visibility
exports transparent { P } // ✓

In the Book

See also

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