gcc/testsuite/gdc.test/fail_compilation/fail6334.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail6334.d(13): Error: static assert: `0` is false |
| 5 | fail_compilation/fail6334.d(11): instantiated from here: `mixin T2!();` |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | mixin template T1() |
| 10 | { |
| 11 | mixin T2; //compiles if these lines |
| 12 | mixin T2!(a, bb, ccc, dddd); //are before T2 declaration |
| 13 | mixin template T2() { static assert(0); } |
| 14 | } |
| 15 | |
| 16 | void main() |
| 17 | { |
| 18 | mixin T1; |
| 19 | } |