Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail115.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=402
2 // compiler crash with mixin and forward reference
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail115.d(17): Error: mixin `Foo!y` cannot resolve forward reference
7 ---
8 */
9
10 template Foo(alias b)
11 {
12 int a() { return b; }
13 }
14
15 void main()
16 {
17 mixin Foo!(y) y;
18 }