Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsValues and types · rule

type.unknown_enum_variant

On this page

The code names a variant that the enum doesn't have, often a misspelling of one it does.

Area 2, Values and types; not declinable; the next step is usually the agent's.

Why Jadpo refuses it

An enum is a closed list of named alternatives, so every value it can hold is one of the variants it declares. A name that isn't among them can never be a value of the enum. Jadpo reports it when you check, and names the variant it is closest to when there is one.

What it looks like

main.jadpo:

example
type TicketStatus = Enum {    open    closed}function reopen() -> TicketStatus {    return TicketStatus.opne}
jadpo checkcheck failed: 1 error, 1 file

error TicketStatus has no variant opne

--> main.jadpo:7:25

  |7 |     return TicketStatus.opne  |                         ^^^^ not a variant
reason
TicketStatus's variants are open and closed. Did you mean open?
next
Use TicketStatus.open (agent)
rule
type.unknown_enum_variant
help
https://jadpo.dev/docs/errors/type.unknown_enum_variant

(agent) at the end of the next: line means your coding agent can make the fix itself.

How to fix it

If you meant a variant the enum has, spell it as the enum declares it:

example
    return TicketStatus.open

reopen now returns the open variant.

If the enum needs another alternative, add it to the enum's list:

example
type TicketStatus = Enum {    open    reopened    closed}function reopen() -> TicketStatus {    return TicketStatus.reopened}

A match on TicketStatus must now cover reopened as well.

Markdown for agents: /docs/errors/type.unknown_enum_variant.md.Built from Jadpo main at aee2e8f.