Bug 16625 – [Reg 2.072] new and previously undeprecated switch case fallthrough error
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-10-19T12:10:00Z
Last change time
2017-01-16T23:23:57Z
Keywords
pull
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2016-10-19T12:10:43Z
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.