Neil Santos a écrit:
Why can't I have a private field in a child that has the same name as a private field in an ancestor? I don't think there's going to be much difficulty determining which private field is referenced; UIM, it'll be similar to how `virtual' methods are traced.
This is what I get while trying to do this:
TException.eph:86: error: cannot overwrite data field `ObjectStructure' of parent object TException.eph:85: error: duplicate field `ObjectStructure'
Using build 20040516 (binary distro).
I'm not sure how other compilers handle this, but, IMVHO, this behavior is desirable.
private hiddens from outside world, not from descendants of an object.
Maurice