[Issue 3282] The overload and override issue of const/immutable member functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 24 07:18:48 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=3282
timon.gehr at gmx.ch changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #10 from timon.gehr at gmx.ch 2012-01-24 07:18:45 PST ---
The signature of the overriding function is identical to the overridden one in
all cases discussed here.
class A{
void f(){} // note: return type void
}
class B: A{
override void f(){} // overrides base f
void f()immutable{} // new overload
void f()shared{} // new overload
}
It is impossible to break the type system (even if the return types would be
different): the new overloads are not even reachable through a base class
reference. The bug is that the compiler does not take into account the storage
class of the hidden this pointer while deciding what overrides what.
--
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