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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 19 23:47:29 PDT 2009


Jarrett Billingsley <jarrett.billingsley at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |jarrett.billingsley at gmail.c
                   |                            |om

--- Comment #4 from Jarrett Billingsley <jarrett.billingsley at gmail.com>  2009-08-19 23:47:28 PDT ---
(In reply to comment #3)
> With private functions, yes. But I've never heard that package functions can't
> be virtual. Stewart Gordan, are you saying package functions aren't virtual by
> design (I hope not), or that this is just the current implementation?

Whether it's by design or not is not entirely clear.  The only thing the spec
says about 'package' in this regard is that it is basically an extension of
'private', in which case it makes sense (in a strange way) that 'package' would
make a method nonvirtual.  But it just seems like it's conflating two entirely
different concepts: access and virtuality.  Private methods can and should be
nonvirtual, since that's a valid optimization.  But it's entirely reasonable to
have a package method that can be overridden.

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