www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17834] New: ICE on switch-local case variable


          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 puremagic.com
          Reporter: timon.gehr gmx.ch

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

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
Internal error: ddmd/backend/symbol.c 1039

Sep 17 2017