https://issues.dlang.org/show_bug.cgi?id=16173
Issue ID: 16173
Summary: Implicit fall through is silently allowed
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
```
import std.stdio;
import std.conv;
void main(string[] argv)
{
int x = to!(int)(argv[1]);
switch (x) {
case 1:
writeln("From 1");
case 2:
writeln("From 2");
x = 3;
break;
case 3:
x = 4;
default:
break;
}
writeln("x = ", x);
}
```
```
$ rdmd test.d 1
>From 1
>From 2
x = 3
```
--