Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail19917.d(22): Error: overlapping default initialization for field `c` and `a`
5 fail_compilation/fail19917.d(22): Error: overlapping default initialization for field `d` and `b`
6 fail_compilation/fail19917.d(39): Error: overlapping default initialization for field `b` and `a`
7 ---
8 */
9
10 struct S
11 {
12 union
13 {
14 struct
15 {
16 int a = 3;
17 int b = 4;
18 }
19 }
20 }
21
22 struct X
23 {
24 union
25 {
26 struct
27 {
28 int a = 3;
29 int b = 4;
30 }
31 struct
32 {
33 int c = 3;
34 int d = 4;
35 }
36 }
37 }
38
39 struct Y
40 {
41 union
42 {
43 struct
44 {
45 union { int a = 3; }
46 }
47 int b = 4;
48 }
49 }