April 09, 2022 [Issue 22999] New: no switch fallthrough error with multi-valued case | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22999 Issue ID: 22999 Summary: no switch fallthrough error with multi-valued case Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: dkorpel@live.nl I forgot `break`, but the compiler didn't raise an error: ``` void main() { int i; switch (0) { case 0, 1: i = 20; default: assert(0); } } ``` Looks similar to issue 11653 -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply