Summary: struct opEquals doesn't conform to language
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-02-18 04:09:28 PST ---
Created an attachment (id=916)
Code demonstrating the issue.

The language specification states (with respect to opEquals in structs) "...the
expressions a.opEquals(b) and b.opEquals(a) are tried. If both resolve to the
same opEquals function, then the expression is rewritten to be a.opEquals(b).
If one is a better match then the other, or one compiles and the other does
not, the one is selected.
Otherwise, an error results."

Structs, however, don't properly follow the "if one compiles and the other does
not" rule, at least not for the form a.opEquals(rvalue). Example attached.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to