[Issue 2417] protected base member is not available via base hanlde in a derived class if it is defined in a separate module

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 17 14:25:53 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2417





------- Comment #6 from aarti at interia.pl  2008-10-17 16:25 -------
I also think that proposed behavior would be useful. There were few cases where
I actually needed such a behavior. 

It would be useful e.g. for clone() function, where you have to create new
object of specific class, and then setup it before return. You might want to
make some properties of this object only changeable for class and its
descendant, and in such a case you are stuck... Either you make your properties
public or you will not have access to these properties.

It might be something similar as access to private members from same module,
which was Walter's experiment, but was fully successful, although no other
language implements it.


-- 



More information about the Digitalmars-d-bugs mailing list