[Issue 3581] "private" attribute breaks "override"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 1 12:39:23 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=3581
Rainer Schuetze <r.sagitario at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |r.sagitario at gmx.de
--- Comment #5 from Rainer Schuetze <r.sagitario at gmx.de> 2011-03-01 12:36:28 PST ---
I think it is often forgotten that protection flags in D are different from C.
For example, "private" does not restrict access to the class, but to the
module, so you can inherit from the class and still have full access to the
private member functions of the base class. That means it makes sense to allow
a private function to be virtual.
I'd also say that protection attributes should not interfere with attributes
that deal with virtuality (abstract, override, final) - they are othogonal.
So I would vote for TDPL.
Note that the compiler has access to all overrides of the private functions
(they must be in the same module), so it might still inline them if never
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