[Issue 8366] New: Overriding const member function in conjunction with mutable overload causes a strange error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 9 21:26:13 PDT 2012
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: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list