Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag13528.d(6): Error: value of `this` is not known at compile time
5 fail_compilation/diag13528.d(6): while evaluating `pragma(msg, __traits(getMember, A, "foo"))`
6 fail_compilation/diag13528.d(12): parent scope from here: `mixin MyTemplate!()`
7 ---
8 */
9 #line 1
10
11 mixin template MyTemplate()
12 {
13 void foo()
14 {
15 pragma(msg, __traits(getMember, typeof(this), "foo"));
16 }
17 }
18
19 class A
20 {
21 mixin MyTemplate;
22 }
23
24 void main()
25 {
26 auto a = new A();
27 }