ErrorsValues and types · rule
type.sibling_mismatch
Field type is used for a sibling field type.
Area 2, Values and types; not declinable; the next step is usually the agent's.
entity Customer { id: Uuid}entity Order { id: Uuid}function customer_reference(id: Customer.id) -> Customer.id { return id}function misuse(order: Order) -> Customer.id { return customer_reference(order.id)}
error Order.id can't be used where Customer.id is required
--> main.jadpo:14:31
|14 | return customer_reference(order.id) | ^^^^^^^^ this is `Order.id`
- reason
- Both refine
Uuid, but a field type widens only to its own declared type, so one type's values never stand in for another's. - next
- Pass a
Customer.idhere (agent) - rule
- type.
sibling_ mismatch - help
- https://jadpo.
dev/docs/errors/type. sibling_ mismatch
Markdown for agents: /docs/errors/type.sibling_mismatch.md.Built from Jadpo main at aee2e8f.