gcc/testsuite/gdc.test/fail_compilation/ice9494.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/ice9494.d(10): Error: circular reference to variable `ice9494.test` |
| 5 | fail_compilation/ice9494.d(14): Error: circular reference to variable `ice9494.Foo.test` |
| 6 | fail_compilation/ice9494.d(19): Error: circular reference to variable `ice9494.Bar.test` |
| 7 | --- |
| 8 | */ |
| 9 | |
| 10 | int[test] test; // stack overflow |
| 11 | |
| 12 | class Foo |
| 13 | { |
| 14 | int[this.test] test; // stack overflow |
| 15 | } |
| 16 | |
| 17 | struct Bar |
| 18 | { |
| 19 | int[this.test] test; // stack overflow |
| 20 | } |