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.pendingis a plain variant; brackets after a case name the data it carries, and this one carries none.- next
- Write
PaymentOutcome.pendingwithout brackets (agent) - rule
- type.
match_ unknown_ binding - help
- https://jadpo.
dev/docs/errors/type. match_ unknown_ binding
Markdown for agents: /docs/errors/type.match_unknown_binding.md.Built from Jadpo main at aee2e8f.