Failures · rule
failure.rule_cannot_break
Arm maps a rule the value cannot break.
Area 4, Failures; not declinable; the next step is usually the agent's.
An arm for a rule the declared ranges prove holds could never run:
type Quantity = Int { min: 1 max: 1000}type QuantityTooSmall = Failure { kind: FailureKind.invalid_value}type QuantityTooLarge = Failure { kind: FailureKind.invalid_value}function doubled(quantity: Quantity) fails QuantityTooSmall, QuantityTooLarge -> Quantity { var result: Quantity = attempt Quantity(quantity * 2) { min: QuantityTooSmall max: QuantityTooLarge } return result}
error: `Quantity(...)` can't break `min`, so it takes no arm --> main.jadpo:16:9 |16 | min: QuantityTooSmall | ^^^ never runs reason: The declared ranges prove the value always follows `min: 1`, so this arm could never run. next: Remove `min: ...` (agent) rule: failure.rule_cannot_break help: https://jadpo.dev/docs/errors/failure.rule_cannot_breakcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/failure.rule_cannot_break.md.Built from Jadpo main at a707efb.