gcc/testsuite/gdc.test/fail_compilation/fail15691.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail15691.d(15): Error: `c` is not a member of `Foo` |
| 5 | fail_compilation/fail15691.d(20): Error: `bc` is not a member of `Foo`, did you mean variable `abc`? |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | struct Foo { int a; int abc; } |
| 10 | |
| 11 | void main() |
| 12 | { |
| 13 | Foo z = { // line 13 |
| 14 | a: 3, |
| 15 | c: 4, // line 15 |
| 16 | }; |
| 17 | |
| 18 | Foo z2 = { // line 18 |
| 19 | a: 3, |
| 20 | bc: 4, // line 20 |
| 21 | }; |
| 22 | } |