[SR-8113] Emit a diagnostic when fallthrough is not the last statement of a case block #50645
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
good first issue
Good for newcomers
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: f56d70a6725a2ca637367b60a49ae340
Issue Description:
We treat fallthrough as if it is "goto $next-case", skipping any code that follows. We should really emit a diagnostic if it is not the last statement in a case block.
For example:
The text was updated successfully, but these errors were encountered: