[Issue 17834] New: ICE on switch-local case variable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 17 19:11:57 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17834

          Issue ID: 17834
           Summary: ICE on switch-local case variable
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: timon.gehr at gmx.ch

void main(){
    switch(2){
        int i=2;
        case i:{}
        default:
    }
}

DMD v2.076.0 gives:

tt.d(5): Deprecation: case variables have to be const or immutable
tt.d(3): Deprecation: 'switch' skips declaration of variable tt.main.i at
tt.d(4)
Internal error: ddmd/backend/symbol.c 1039

--


More information about the Digitalmars-d-bugs mailing list