Wouldn't it be better to return the class's typeinfo if it is a class and the interface's typeinfo if it isn't? The interface would then return the most derived typeinfo that it knows of. I think, just because the interface can be something other then a class object, doesn't mean it should be treated as though it will never be a class object.<div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Dec 3, 2012 at 5:10 AM, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</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 12/3/2012 6:26 AM, Gor Gyolchanyan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What's the logic in this behavior?<br>
</blockquote>
<br></div>
Think of it this way. An int can be implicitly converted to a long, but they have different typeid's because they are different bits.<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Bye,<br>Gor Gyolchanyan.<br>
</div>