aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test17807.d
blob: b8c5518c3b0bf5b4b0de90b56cb307763eb9251a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// REQUIRED_ARGS: -o- -w

int bug17807(){
    int y=0;
    Lswitch: switch(2){
        { case 0: break; }
        enum x=0;
        struct S{ enum x=0; }
        int foo(){
            return 0;
        }
        default: y=x+S.x+foo();
        static foreach(i;1..5)
            case i: break Lswitch;
    }
    return y;
}