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

ErrorsLogic · rule

syntax.switch_statement

Choice written with switch or when.

Area 3, Logic; not declinable; the next step is usually the agent's.

A choice between cases is a match, with arms pattern -> result: switch and when are match, case goes, and default or else is _.

example
type TicketStatus = Enum {    open    closed}type Rank = Int {    min: 1}function rank(status: TicketStatus) -> Rank {    return switch (status) {        TicketStatus.open -> 1        TicketStatus.closed -> 2    }}
jadpo checkcheck failed: 1 error, 1 file

error Jadpo writes match, not switch

--> main.jadpo:11:12

   |11 |     return switch (status) {   |            ^^^^^^ write `match`
reason
switch chooses between cases in JavaScript, Java, C#, Go and Swift, and when in Kotlin; Jadpo's match does, with one arm per line, pattern -> result, covering every case.
next
Use match instead of switch (agent)
rule
syntax.switch_statement
help
https://jadpo.dev/docs/errors/syntax.switch_statement

Markdown for agents: /docs/errors/syntax.switch_statement.md.Built from Jadpo main at aee2e8f.