ErrorsValues and types · rule
type.not_a_type
Field's type is written as a value or a call.
Area 2, Values and types; not declinable; the next step is usually the agent's.
A field's type is a type, never a value: a call, a literal or an enum's
variant written where the type goes is refused, naming the field. Every
block of fields is held to it, an entity's and config { }'s settings too:
type TicketStatus = Enum { open closed}type NewTicket = Input { status: TicketStatus.open}
error status's type is written as a value, TicketStatus.open
--> main.jadpo:7:13
|7 | status: TicketStatus.open | ^^^^^^^^^^^^^^^^^ a value of `TicketStatus`, not a type
- reason
- A field's type says which values it may hold, such as
TicketStatus;TicketStatus.openis one of those values, given where a value is built. - next
- Write
TicketStatus(agent) - rule
- type.
not_ a_ type - help
- https://jadpo.
dev/docs/errors/type. not_ a_ type
Markdown for agents: /docs/errors/type.not_a_type.md.Built from Jadpo main at aee2e8f.