[Issue 5056] New: Warning against virtual method call from constructor
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 15 05:03:29 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5056
Summary: Warning against virtual method call from constructor
Product: D
Version: D1 & D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-10-15 05:02:51 PDT ---
I suggest to add a compiler suggestion/tip (a kind of warning) against
(transitively) calling virtual methods inside its constructors, because doing
so causes the most-derived override to be called, regardless of whether the
constructor for the type that defines the most-derived override has been
called.
--
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