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

           Summary: Nonsense associative array comparison
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2013-06-16 
18:29:05 MSD ---
Currently associative arrays are compared by comparing its `impl` pointers e.g.
`aa1 < aa2` is rewritten as `cast(void*) aa1 > cast(void*) aa2` instead of
calling a runtime function.

---
void main()
{
    int[int] aa1 = [0: 1];
    int[int] aa2 = [0: 1];
    assert(aa1 == aa2); // Passes
    assert(!(aa1 < aa2) && !(aa1 > aa2)); // Fails, different `impl`-s
}
---

And yes, there is not such function in druntime so this is druntime's issue
too.

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

Reply via email to