[Issue 22999] New: no switch fallthrough error with multi-valued case
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 9 16:29:43 UTC 2022
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 at puremagic.com
Reporter: dkorpel at 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
--
More information about the Digitalmars-d-bugs
mailing list