[Issue 3258] Calling private or package override methods calls the base implementation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 22 02:27:31 PST 2012


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



--- Comment #12 from Diggory <diggory.hardy at gmail.com> 2012-12-22 02:26:22 PST ---
(In reply to comment #11)
> (In reply to comment #10)
> > I forgot one thing that completes the circle, and that is friend declarations.
> 
> There are no friend declarations in D.  So what exactly are you talking about?

Look up friend classes/functions in C++ and his meaning should be clear.

For the problem at hand though, without causing a lot of breakage, that means
either private/package become virtual by default, private/package can never be
virtual, or a 'virtual' (or 'overridable') keyword is introduced. In theory I
agree with Andrej, but would probably vote that handling all protection methods
in the same way is preferable.

In an ideal world though, I think I'd choose to make overriding explicit and
shadowing illegal: i.e. unless 'virtual'/'override' is specified names must not
clash with those from a base class.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list