Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice9439.d(12): Error: calling non-static function `foo` requires an instance of type `Derived`
5 fail_compilation/ice9439.d(12): while evaluating: `static assert(foo())`
6 fail_compilation/ice9439.d(19): Error: template instance `ice9439.Base.boo!(foo)` error instantiating
7 ---
8 */
9
10 class Base {
11 void boo(alias F)() {
12 static assert(F());
13 }
14 }
15
16 class Derived : Base {
17 int foo() { return 1; }
18 void bug() {
19 boo!(foo)();
20 }
21 }