[Issue 6210] New: Associative array with array key often cannot be equated.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 24 13:36:19 PDT 2011


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

           Summary: Associative array with array key often cannot be
                    equated.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody at puremagic.com
        ReportedBy: kennytm at gmail.com


--- Comment #0 from kennytm at gmail.com 2011-06-24 13:31:30 PDT ---
Test case 1:
----------------------------------------
void main() {
    int[char[]] a;
    a["h"] = 1;
    assert(a == a.dup); // <-- asserts
}
----------------------------------------

Test case 2:
----------------------------------------
void main() {
    int[immutable(int)[]] a, b;
    a[[1].idup] = 1;
    b[[1].idup] = 1;
    assert(a == b); // <-- asserts
}
----------------------------------------

-- 
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