[Issue 16625] New: [Reg 2.072] new and previously undeprecated switch case fallthrough error
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Oct 19 05:10:43 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16625
Issue ID: 16625
Summary: [Reg 2.072] new and previously undeprecated switch
case fallthrough error
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
cat > bug.d << CODE
uint test(uint val)
{
switch (val)
{
case 1: val <<= 1;
default:
return val;
}
}
CODE
dmd -c bug
----
bug.d(6): Error: switch case fallthrough - use 'goto default;' if intended
----
Apparently this was a warning before but that doesn't warrant skipping the
deprecation phase for new errors.
--
More information about the Digitalmars-d-bugs
mailing list