dmd/changelog/dmd.deprecation-case.dd
2024-08-21 10:01:48 +03:00

18 lines
408 B
Text

An error is now given for case fallthough for multivalued cases
This used to give a deprecation, this now gives an error:
```
int i;
switch (0)
{
case 0, 1: i = 20;
default: assert(0); // Error: switch case fallthrough - use 'goto default;' if intended
}
switch (0)
{
default:
case 0, 1: i = 20;
case 2, 3: i = 30; // Error: switch case fallthrough - use 'goto case;' if intended
}
```