https://issues.dlang.org/show_bug.cgi?id=16967
Issue ID: 16967
Summary: No switch case fallthrough warnings in in/out
contracts
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Switch case fallthrough warnings are not generated for code in in/out
contracts.
-----
import std.stdio;
void main()
{
auto str = "test";
void testFunc ( )
in
{
switch (str)
{
case "test":
writeln("test"); // Does not generate a warning
default:
break;
}
}
body
{
switch (str)
{
case "test":
writeln("test"); // Generates a warning
default:
break;
}
}
testFunc();
}
-----
--