]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/diag13528.d
5d908f7cbf3f582d533f7506929815685774ebb8
[gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag13528.d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag13528.d(13): Error: value of `this` is not known at compile time
5 fail_compilation/diag13528.d(13): while evaluating `pragma(msg, __traits(getMember, A, "foo"))`
6 ---
7 */
8
9 mixin template MyTemplate()
10 {
11 void foo()
12 {
13 pragma(msg, __traits(getMember, typeof(this), "foo"));
14 }
15 }
16
17 class A
18 {
19 mixin MyTemplate;
20 }
21
22 void main()
23 {
24 auto a = new A();
25 }
This page took 0.034316 seconds and 4 git commands to generate.