module test; class A { int foo() { return 0; } int callfoo() { return foo(); } } class B : A { override int foo() { return 1; } } int test() { A a = new B; return a.callfoo(); } static assert(test() == 1); Compiling with "dmd -c test.d" yields: test.d(24): Error: static assert (0 == 1) is false If you use "a.foo()" instead of "a.callfoo()", the assert succeeds.
https://github.com/D-Programming-Language/dmd/commit/767708299a408b4a234ee9ad4f45b0e6e0c21e6d https://github.com/D-Programming-Language/dmd/commit/13195c39ae3e3788c559d8e88d3203371e43f029