d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / goto3.d
blobef3b5f76dc1b86c570609b2aa0b0f4f0304c3002
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/goto3.d(1010): Error: case cannot be in different `try` block level from `switch`
5 fail_compilation/goto3.d(1012): Error: default cannot be in different `try` block level from `switch`
6 ---
7 */
10 void foo();
11 void bar();
13 #line 1000
15 void test1()
17 int i;
18 switch (i)
20 case 1:
21 try
23 foo();
24 case 2:
25 { }
26 default:
27 { }
29 finally
31 bar();
33 break;