Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/e7804_2.d(17): Error: `__traits(getMember, Foo, "func")` does not give a valid type
5 ---
6 */
7
8 module e7804_2;
9
10 class Foo
11 {
12 void func(){}
13 }
14
15 void test()
16 {
17 __traits(getMember, Foo, "func") var;
18 auto a = cast(__traits(getMember, Foo, "func")) 0;
19 }