https://d.puremagic.com/issues/show_bug.cgi?id=11648

           Summary: rangeerror when adding element to associative array
                    and value is implicitely converted by alias this
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Rainer Schuetze <[email protected]> 2013-11-30 06:33:16 
PST ---
dmd 2.063 compiles and runs this code correctly:

//////////////////
import std.stdio;

struct S
{
    int _payload;
    alias _payload this;
}

void main()
{
    S[string] symbols;
    symbols["a"] = 1; // works if using S(1)
    writeln(symbols); // ["a":1]
}
////////////////

but dmd 2.064 causes a range error when executing:

core.exception.RangeError@test(12): Range violation

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

Reply via email to