Values and types · rule
type.unknown_variant_field
Variant has no such field.
Area 2, Values and types; not declinable; the next step is usually the agent's.
type DeclineReason = Text { max_length: 200}type PaymentOutcome = Enum { declined: { reason: DeclineReason }}function declined_payment(reason: DeclineReason) -> PaymentOutcome { return PaymentOutcome.declined { reason: reason note: reason }}
error: `PaymentOutcome.declined` has no field `note` --> main.jadpo:14:9 |14 | note: reason | ^^^^ not declared reason: `PaymentOutcome.declined`'s fields are `reason`. next: Remove `note`, or declare it on `PaymentOutcome.declined` (agent) rule: type.unknown_variant_field help: https://jadpo.dev/docs/errors/type.unknown_variant_fieldcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/type.unknown_variant_field.md.Built from Jadpo main at a707efb.