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.<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 30, 2012 at 2:55 PM, Maxim Fomin <span dir="ltr"><<a href="mailto:maxim@maxim-fomin.ru" target="_blank">maxim@maxim-fomin.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Friday, 30 November 2012 at 10:05:21 UTC, Gor Gyolchanyan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
interface I { }<br>
class C: I { }<br>
<br>
I object = new C;<br>
assert(typeid(object) == typeid(C)); // fails<br>
<br>
Is this normal or is it a bug?<br>
Note, that the same works fine in case of a base class, rather then an<br>
interface.<br>
</blockquote>
<br></div>
It works according to spec. Object is expression of type interface I, so no dynamic type search is performed.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Bye,<br>Gor Gyolchanyan.<br>
</div>