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

           Summary: Cannot set value to associative array from a
                    weakly-pure function when the value type has a (pure)
                    opAssign
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: kenn...@gmail.com


--- Comment #0 from kenn...@gmail.com 2011-05-29 09:01:33 PDT ---
Test case:

----------------------------------------
struct S {
    void opAssign(in int other) pure {
    }
}
void add() pure {
    S[int] d;
    d[0] = 1;
}
----------------------------------------
x.d(7): Error: variable __aatmp3 forward referenced
x.d(7): Error: pure nested function 'add' cannot access mutable data '__aatmp3'
x.d(7): Error: variable __aatmp3 forward referenced
x.d(7): Error: pure nested function 'add' cannot access mutable data '__aatmp3'
x.d(7): Error: variable __aatmp3 forward referenced
x.d(7): Error: pure nested function 'add' cannot access mutable data '__aatmp3'
----------------------------------------

The bug is introduced somewhere between 2.048 and 2.052.

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

Reply via email to