Values and types · rule
type.duplicate_variant_field
Variant field is given twice.
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 reason: reason }}
error: `reason` is given twice --> main.jadpo:14:9 |13 | reason: reason | ------ first given here14 | reason: reason | ^^^^^^ given again reason: Each field of `PaymentOutcome.declined` is given once, so there is never a question of which value counts. next: Remove one `reason` (agent) rule: type.duplicate_variant_field help: https://jadpo.dev/docs/errors/type.duplicate_variant_fieldcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/type.duplicate_variant_field.md.Built from Jadpo main at a707efb.