http://d.puremagic.com/issues/show_bug.cgi?id=3659
Summary: Too much exegesis on opEquals Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: and...@metalanguage.com --- Comment #0 from Andrei Alexandrescu <and...@metalanguage.com> 2009-12-30 09:14:06 PST --- struct A { bool opEquals(int x) { return false; } } Compiler says: Error: function test.A.opEquals type signature should be const bool(ref const(A)) not bool(int x) The compiler should accept any signature for opEquals. All it needs to do is rewrite a == b into a.opEquals(b) or b.opEquals(a). For classes I'm doubtful that opEquals needs to be const. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------