]>
Commit | Line | Data |
---|---|---|
b4c522fa IB |
1 | /* |
2 | TEST_OUTPUT: | |
3 | --- | |
8da8c7d3 | 4 | fail_compilation/fail155.d(20): Error: overlapping initialization for field `x` and `y` |
5fee5ec3 | 5 | fail_compilation/fail155.d(20): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized |
b4c522fa IB |
6 | --- |
7 | */ | |
8 | ||
9 | struct S | |
10 | { | |
11 | int i; | |
12 | union | |
13 | { | |
14 | int x; | |
15 | int y; | |
16 | } | |
17 | int j; | |
18 | } | |
19 | ||
20 | S s = S( 1, 2, 3, 4 ); |