http://d.puremagic.com/issues/show_bug.cgi?id=11161

           Summary: If `opEquals` is not defined, compiler should
                    translate struct objects equality to member-wise
                    equality even if there is `alias this`
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-10-03 
11:59:38 MSD ---
---
struct S {
    bool opEquals(ref const S) { return false; } 
}
struct T {
    S s;
    int value;
    alias value this;
}

void main() {
    T t1, t2;
    assert(t1.tupleof != t2.tupleof);
    assert(t1 != t2); // fails
}
---

If this behavior is expected, please write the reasons shortly and change it to
documentation issue unless this feature is documented.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to