1 /* 2 TEST_OUTPUT: 3 --- 4 fail_compilation/ice9439.d(12): Error: this for foo needs to be type Derived not type ice9439.Base 5 fail_compilation/ice9439.d(12): while evaluating: `static assert((__error).foo())` 6 fail_compilation/ice9439.d(19): Error: template instance ice9439.Base.boo!(foo) error instantiating 7 --- 8 */ 9 10 class Base { boo(alias F)11 void boo(alias F)() { 12 static assert(F()); 13 } 14 } 15 16 class Derived : Base { foo()17 int foo() { return 1; } bug()18 void bug() { 19 boo!(foo)(); 20 } 21 } 22