www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16625] New: [Reg 2.072] new and previously undeprecated

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 puremagic.com
          Reporter: code 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.

--
Oct 19 2016