method returning child, doesn't overrides declared method returning parent

Timon Gehr timon.gehr at gmx.ch
Tue Aug 30 11:47:05 PDT 2011


On 08/30/2011 08:32 PM, Steven Schveighoffer wrote:
> On Tue, 30 Aug 2011 14:27:25 -0400, Timon Gehr <timon.gehr at gmx.ch> wrote:
>
>> What I was saying is not that there is no specific layout, just that
>> an interface by itself does not need to be represented in the object
>> file. All interface vtbls are part of the classinfo of the
>> implementing classes.
>>
>> in
>>
>> interface I{
>> void method();
>> }
>> class C: I{
>> void method(){}
>> }
>>
>> No overriding of an existing implementation is taking place, the
>> interface inheritance creates a new interface vtable.
>
> OK I really can't continue this :) The details we are discussing are
> abstractly defined in the compiler, and really should have no place in
> whether something is a 'hook' or not. It really just depends on how you
> look at it.
>

I guess so. :)


More information about the Digitalmars-d mailing list