www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16578] New: bogus deprecation - switch skips declaration of


          Issue ID: 16578
           Summary: bogus deprecation - switch skips declaration of
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: mk krej.cz

string[string] opts;

void main()
    string arg;
    switch (arg)
        case "-f": opts["fore"] = ""; break;
        debug { case "-throw": opts["throw"] = ""; break; }

bug.d(6): Deprecation: 'switch' skips declaration of variable
bug.main.__aaval51 at bug.d(8)

dmd 2.072 b1
compile with -debug

Related pull:
Pull https://github.com/dlang/dmd/pull/5869

Oct 02 2016