If you have to mark the method as abstract, it should produce an error while compiling, not on linking. I had to figure out the problem because I didn't get any error when compiling. On big projects have descriptive errors is a must. //version = WORKS; interface I { void test(); } abstract class A : I { version (WORKS) { // Works abstract void test(); } else { // Error 42: Symbol Undefined _D2aa1A4testMFZv void test(); } } class B : A { void test() { } } int main(string[] args) { return 0; }
A.test can be defined externally in another object file, that's why it's a linker error.