[Issue 2417] protected base member is not available via base handle in a derived class if it is defined in a separate module
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 24 08:58:23 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2417
schveiguy at yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
Keywords| |spec
------- Comment #12 from schveiguy at yahoo.com 2008-11-24 10:58 -------
In that case, I think the spec should be changed to reflect the current
behavior. I think Walter wanted it to model after the way C++ works, and it
just wasn't explained well enough.
Without the current behavior (i.e. allowing m2.foo to be callable), functions
like clone would be difficult to implement.
I think the spec should be changed to say:
"If accessing a protected instance member through a derived class member
function, that member can only be accessed for an object instance which can be
implicitly cast to the same type as 'this'."
--
More information about the Digitalmars-d-bugs
mailing list