nested class inheritance
Gor Gyolchanyan
gor.f.gyolchanyan at gmail.com
Fri Jul 13 10:59:54 PDT 2012
Doesn't this make sense?
class Fruit
{
class Seed { }
}
class Apple: Fruit
{
class AppleSeed: Fruit.Seed { }
}
This means, that as Fruit.Seed needs access to enclosing Fruit, AppleSeed,
being a Fruit.Seed will also have access to enclosing Fruit, which is Apple.
DMD 0.259 has this to say:
Error: class main.Apple.AppleSeed is nested within Apple, but super class
Seed is nested within Fruit
Which doesn't make sense, IMO. What do you guys think about this? Who makes
more sense me or DMD 2.059?
--
Bye,
Gor Gyolchanyan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120713/c85fcec9/attachment.html>
More information about the Digitalmars-d
mailing list