bynk.parse.uses_after_decls
Error uses appears after other declarations.
In the fragment form of a commons or context (the header with no braces), the uses clauses come straight after the header, before any type or fn. Move the uses line up. consumes and exports clauses follow the same rule, as bynk.parse.consumes_after_decls and bynk.parse.exports_after_decls: consumes after the uses lines, exports after the consumes lines.
Example
commons demotype Id = Stringuses util // ✗ a declaration comes first
commons demouses util // ✓ clauses straight after the headertype Id = StringIn the Book
See also
- The grammar rule it governs:
uses_decl. - Every code in its category, Parser, on the diagnostic index.
bynk explain bynk.parse.uses_after_declsshows the same from the installed toolchain, without a network.