Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail14406.d-mixin-20(20): Error: cannot declare field `bar_obj` because it will change the determined size of `CFrop`
5 fail_compilation/fail14406.d-mixin-25(25): Error: field `bar_obj` not allowed in interface
6 ---
7 */
8
9 class Foo {}
10
11 string strMixin(T)()
12 {
13 static if (T.tupleof.length) {}
14 return "Bar bar_obj;
15 static class Bar { Foo foo; }";
16 }
17
18 class CFrop
19 {
20 mixin(strMixin!(typeof(this)));
21 }
22
23 interface IFrop
24 {
25 mixin(strMixin!(typeof(this)));
26 }