Skip to content
Playground(another site)

bynk.visibility.private_not_allowed

Error private modifies a declaration it does not apply to: anything but a fn, type, messages, asset, embed or const in a commons or context.

private hides a fn, type, messages, asset, embed or const from the units that import its commons or context. It does not apply to a service, agent, capability, provider, actor or event, or to anything in an adapter: how far those reach is decided by a context's exports and consumes, and an adapter's exports. Remove private. See bynk.visibility.private_item for using something that is private.

Example

private service total { … } // ✗ `private` does not apply to a service
service total { … } // ✓ reach is governed by `exports`

In the Book

See also

  • The grammar rule it governs: visibility_modifier.
  • Every code in its category, Other, on the diagnostic index.
  • bynk explain bynk.visibility.private_not_allowed shows the same from the installed toolchain, without a network.