http://d.puremagic.com/issues/show_bug.cgi?id=8366
Summary: Overriding const member function in conjunction with
mutable overload causes a strange error
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: blocker
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Kenji Hara <[email protected]> 2012-07-09 21:26:12 PDT ---
I think this problem blocks 2.060 release.
code:
----
class C {
// overrides Object.opEquals
bool opEquals(const Object o) const {}
// introduce mutable overload
bool opEquals(const Object o) {} // line8
}
void main(){}
output:
----
test.d(8): Error: function test.C.opEquals multiple overrides of same function
The second opEquals should *introduce* new member function. But, by the const
attribute inference, it is determined as *multiple overrides".
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------