gcc/testsuite/gdc.test/fail_compilation/fail18057.d
raw| 1 | /** |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail18057.d(16): Error: template instance `RBNode!int` `RBNode` is not a template declaration, it is a struct |
| 5 | fail_compilation/fail18057.d(13): Error: variable `fail18057.RBNode.copy` recursive initialization of field |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | // https://issues.dlang.org/show_bug.cgi?id=18057 |
| 10 | // Recursive field initializer causes segfault. |
| 11 | struct RBNode |
| 12 | { |
| 13 | RBNode *copy = new RBNode; |
| 14 | } |
| 15 | |
| 16 | alias bug18057 = RBNode!int; |