[Issue 3983] New: Regression(2.037): struct with == can't be member of struct with template opEquals
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 18 02:48:19 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3983
Summary: Regression(2.037): struct with == can't be member of
struct with template opEquals
Product: D
Version: 2.034
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: diagnostic, rejects-valid
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at yahoo.com.au> 2010-03-18 02:48:16 PDT ---
struct Fug
{
bool opEquals(ref const Fug y) const {
return false;
}
}
struct Fig
{ // line 29
Fug f;
bool opEquals(Tdummy=void)(ref const Fig y) const {
return false;
}
bool opEquals(T: int)(T y) const {
return false;
}
}
void main() {
Fig fx, fy;
if (fx==2) {}
}
---
And the error message is nonsense:
bug.d(29): Error: function bug.Fig.opEquals conflicts with template
bug.Fig.opEq
uals(Tdummy = void) at bug.d(31)
Worked in 2.036.
--------
// Workaround is to change Fug opEquals to:
bool opEquals(Tdummy=void)(ref const Fug y) const
--
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