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 Fri, Nov 30, 2012 at 2:55 PM, Maxim Fomin <maxim@maxim-fomin.ru> wrote:
On Friday, 30 November 2012 at 10:05:21 UTC, Gor Gyolchanyan wrote:
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.

It works according to spec. Object is expression of type interface I, so no dynamic type search is performed.



--
Bye,
Gor Gyolchanyan.