One way to test for overriding at runtime is to compare the function pointer of a delegate obtained at runtime to the function pointer obtained from the compile time type.
Here's a simplified example:
import std.stdio;
class A {
void fun() {}
}
class B : A {
override void fun() {}
}
void main() {
auto a = new A;
auto b = new B;
auto aDel = &a.fun;
auto bDel = &b.fun;
writeln(&A.fun is aDel.funcptr); // True: fun is not overridden
writeln(&A.fun is bDel.funcptr); // False: fun is overridden
}
