ErrorsValues and types · rule
type.missing_variant_field
Variant is missing a field.
Area 2, Values and types; not declinable; the next step is usually the agent's.
type ReceiptId = Uuid {}type PaymentOutcome = Enum { pending paid: { receipt_id: ReceiptId }}function paid() -> PaymentOutcome { return PaymentOutcome.paid {}}
error PaymentOutcome.paid is missing receipt_id
--> main.jadpo:11:12
|11 | return PaymentOutcome.paid {} | ^^^^^^^^^^^^^^^^^^^ fields missing
- reason
- Every field of
PaymentOutcome.paidis given when a value is built; a field that may be absent is declaredT?and given asnone. - next
- Add
receipt_id: ...to the block (agent) - rule
- type.
missing_ variant_ field - help
- https://jadpo.
dev/docs/errors/type. missing_ variant_ field
Markdown for agents: /docs/errors/type.missing_variant_field.md.Built from Jadpo main at aee2e8f.