ErrorsValues 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.declinedis 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_ field
Markdown for agents: /docs/errors/type.duplicate_variant_field.md.Built from Jadpo main at aee2e8f.