[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 13:25:00 PDT 2008


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





------- Comment #4 from jarrett.billingsley at gmail.com  2008-10-17 15:24 -------
When you want to do this, there is no really reasonable way around it.  You
make the method protected, subclasses can't call it.  You make it private, no
one can call it.  You make it package, only classes at the same level in the
package hierarchy can call it.  You make it public, anyone can call it.  There
is no good solution.  There is no way to say "this method can be overridden or
called from derived classes and nowhere else," which is ostensibly more useful
than "this method can only be overridden in derived classes."


-- 



More information about the Digitalmars-d-bugs mailing list