[Issue 6590] New: mixed in case and default statements do not create a new scope

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 1 13:28:08 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6590

           Summary: mixed in case and default statements do not create a
                    new scope
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2011-09-01 13:28:03 PDT ---
consider

void main(){
    int x;
    switch(x){
        case 0: auto e=1; break;
        case 1: auto e=2; break; // fine
        default: auto e=3; break; // fine
    }
    switch(x){
        case 0: auto e=1; break;
        mixin("case 1:"); auto e=2; break; //error
        mixin("default:"); auto e=3; break;// error
    }
}

tested with DMD 2.054

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list