Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/test18736.d

raw
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/test18736.d(21): Error: constructor calls not allowed in loops or after labels
4 ---
5 */
6
7 // https://issues.dlang.org/show_bug.cgi?id=18736
8
9 class A
10 {
11 this(char c) { }
12
13 this(int i)
14 {
15 switch (i)
16 {
17 case 1: break;
18 case 2: .. case 4: break;
19 default: break;
20 }
21 this('c');
22 }
23 }