Skip to content

ZNTC0703: Only one default clause is allowed in a switch statement

Only one default clause is allowed in a switch statement

Category: Parser: Statement/Control Flow

switch(x) { default: break; default: break; }

Reproduce in Playground →

See the error message for cause and resolution.