bynk.parse.consumes_after_decls
Error consumes appears after other declarations.
In the fragment form of a context (the header with no braces), the consumes clauses come straight after the uses lines, before any type or fn, so a unit's dependencies are all stated at the top. Move the consumes line up. uses and exports follow the same rule, as bynk.parse.uses_after_decls and bynk.parse.exports_after_decls.
Example
context shop.orderstype Id = Stringconsumes shop.payment // ✗ a declaration comes first
context shop.ordersconsumes shop.payment // ✓ clauses straight after the headertype Id = StringIn the Book
See also
- The grammar rule it governs:
consumes_decl. - Every code in its category, Parser, on the diagnostic index.
bynk explain bynk.parse.consumes_after_declsshows the same from the installed toolchain, without a network.