bynk.uses.self_reference
Error A commons uses itself.
uses brings another commons into scope. A commons' own declarations are already there, so using itself adds nothing, and a unit that depends on itself is a cycle of length one. Delete the clause, or, if you meant another commons, name it. The mirror of this for contexts is bynk.consumes.self_reference.
Example
commons tax
fn rate() -> Int { 20 }
// money.bynkcommons money
uses money // ✗ a commons cannot use itselfuses tax // ✓ a different commons
type Amount = Int where NonNegativeIn the Book
See also
- The grammar rule it governs:
uses_decl. - Every code in its category, Uses, on the diagnostic index.
bynk explain bynk.uses.self_referenceshows the same from the installed toolchain, without a network.