nested class inheritance

deadalnix deadalnix at gmail.com
Sat Jul 14 09:15:49 PDT 2012


On 13/07/2012 21:10, Andrei Alexandrescu wrote:
> On 7/13/12 3:07 PM, Gor Gyolchanyan wrote:
>> On Fri, Jul 13, 2012 at 11:03 PM, Andrei Alexandrescu
>> <SeeWebsiteForEmail at erdani.org <mailto:SeeWebsiteForEmail at erdani.org>>
>> wrote:
>>
>> On 7/13/12 2:30 PM, Gor Gyolchanyan wrote:
>>
>> The whole point is to have it not static. I need it to be properly
>> nested with the this.outer.
>>
>>
>> What would be the type of this.outer?
>>
>> Andrei
>>
>>
>> For Fruit.Seed it's Fruit, for AppleSeed it's Apple. This makes sense
>> because the Apple, which AppleSeed sees is the same object, which
>> Fruit.Seed sees as it's base type Fruit.
>
> That would mean AppleSeed has two outer fields: a Fruit and an Apple.
>
> Andrei
>

An Apple is a Fruit, so it shouldn't be a problem and don't require 2 
fields.


More information about the Digitalmars-d mailing list