Logic · rule
type.match_unknown_binding
Pattern names data a case does not carry.
Area 3, Logic; not declinable; the next step is usually the agent's.
Brackets after a case name the data it carries, and a plain variant carries none:
function describe(outcome: PaymentOutcome) -> Label { return match outcome { PaymentOutcome.pending(waiting) -> "Pending" PaymentOutcome.paid -> "Paid" }}
error: `PaymentOutcome.pending` carries no data to name --> main.jadpo:3:31 |3 | PaymentOutcome.pending(waiting) -> "Pending" | ^^^^^^^^^ no data reason: `PaymentOutcome.pending` is a plain variant; brackets after a case name the data it carries, and this one carries none. next: Write `PaymentOutcome.pending` without brackets (agent) rule: type.match_unknown_binding help: https://jadpo.dev/docs/errors/type.match_unknown_bindingcheck failed: 1 error, 2 files
Markdown for agents: /docs/errors/type.match_unknown_binding.md.Built from Jadpo main at a707efb.