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

--- Comment #0 from Rob Jacques <> 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

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

Reply via email to