bynk.resolve.const_outside_context_or_commons
Error A const declaration appears outside a context or commons.
An adapter is the program's boundary with the host: it declares capabilities and the providers a binding supplies, not values for the program to share, so a const is refused there. Declare the constant in a commons, which a unit reads by uses, or in the context that needs it, and move it out of the adapter.
Example
const Lifetime: Int = 3600 // ✗ an adapter declares no constants
// limits.bynkcommons limitsconst Lifetime: Int = 3600 // ✓ in a commonsIn the Book
See also
- The grammar rule it governs:
const_decl. - Every code in its category, Resolution, on the diagnostic index.
bynk explain bynk.resolve.const_outside_context_or_commonsshows the same from the installed toolchain, without a network.