Values and types · rule
type.rule_not_condition
Rule's condition isn't a Bool.
Area 2, Values and types; not declinable; the next step is usually the agent's.
A rule holds or it doesn't, so its condition is a Bool:
type Stock = Int { min: 0}type PriceBand = Object { low: Stock high: Stock rule spread: high - low}
error: The rule `spread` isn't a condition --> main.jadpo:8:18 |8 | rule spread: high - low | ^^^^^^^^^^ this is `Int` reason: A rule holds for a value or it doesn't, so its condition is a `Bool`: a comparison such as `high > low`, or several joined with `and`, `or` and `not`. next: Write `spread` as a comparison of `PriceBand`'s fields (agent) rule: type.rule_not_condition help: https://jadpo.dev/docs/errors/type.rule_not_conditioncheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/type.rule_not_condition.md.Built from Jadpo main at a707efb.