[Issue 5131] New: [ICE] opAssign and associative arrays (AA) are broken for types != this

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 29 11:43:32 PDT 2010


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

           Summary: [ICE] opAssign and associative arrays (AA) are broken
                    for types != this
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: sandford at jhu.edu


--- Comment #0 from Rob Jacques <sandford at jhu.edu> 2010-10-29 11:42:39 PDT ---
Using DMD 2.050, when trying to assign a value to an associative array that is
not the type of the AA results in an ICE.

Here are two test cases:

import std.variant;
void main() {
    Variant[string] a;
    a["ICE?"] = 1;
}

------------------------

struct ICE {
    ICE opAssign(int x) { return this; }
};
void main() {
    ICE[string] a;
    a["ICE?"] = 1;
}

Note that:

void main() {
    Variant[string] a;
    a["ICE?"] = Variant(1);
}

compiles correctly. See http://d.puremagic.com/issues/show_bug.cgi?id=2451

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