On Thursday, 6 June 2019 at 20:22:00 UTC, Amex wrote:
I i = new D();
It is a bizarre quirk, I think because interfaces do not necessarily point to objects with RTTI (though this can be statically determined, so I am not sure that is valid), but when you do typeid on an interface, it gives the typeinfo for that interface, not the object itself.
First cast to Object, then get the typeid and you'll see what you want to see.
maybe we should just change this behavior.