Identity of interfaces (or not)

BCS ao at pathlink.com
Tue Dec 2 12:45:35 PST 2008


Reply to Frits,

> BCS wrote:
> 
>> Reply to Tomas,
>> 
>>> The problem is that B has two vtables that implement the interface
>>> I. However, in A.addChild, i.parent get's the first one (introduced
>>> by A), and in main, it gets the second one (J , which derived from
>>> I). The identity check then fails because the pointers aren't the
>>> same, even though it's the same object in question.
>>> 
>> why not make
>> Ia == Ib
>> into
>> cast(Object)Ia == cast(Object)Ib
>> ?
> Because he's talking about 'is', not '=='?
> 

ok `s/==/is/` now?





More information about the Digitalmars-d mailing list