So the interfaces aren't supposed to hold a TypeInfo? That doesn't sound right. That makes interfaces useless in a very large set of use cases.
On Friday, 30 November 2012 at 10:05:21 UTC, Gor Gyolchanyan wrote:It works according to spec. Object is expression of type interface I, so no dynamic type search is performed.
interface I { }
class C: I { }
I object = new C;
assert(typeid(object) == typeid(C)); // fails
Is this normal or is it a bug?
Note, that the same works fine in case of a base class, rather then an
interface.