Thread overview
[Issue 6075] New: Cannot set value to associative array from a weakly-pure function when the value type has a (pure) opAssign
May 29, 2011
kennytm@gmail.com
Jun 06, 2011
kennytm@gmail.com
Jun 18, 2011
kennytm@gmail.com
Jun 27, 2011
kennytm@gmail.com
May 29, 2011
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: nobody@puremagic.com
        ReportedBy: kennytm@gmail.com


--- Comment #0 from kennytm@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: -------
June 06, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6075



--- Comment #1 from kennytm@gmail.com 2011-06-06 03:27:16 PDT ---
The bug was introduced in commit 44d7881 (fix bug 2451), manifesting itself as
a Segfault (null pointer dereferencing).

The Segfault was later converted to an error in commit 37aacfc (bug 5131).

https://github.com/D-Programming-Language/dmd/commit/44d7881 https://github.com/D-Programming-Language/dmd/commit/37aacfc

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 18, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6075


kennytm@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #2 from kennytm@gmail.com 2011-06-18 10:02:33 PDT ---
DMD pull #140.

https://github.com/D-Programming-Language/dmd/pull/140

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 27, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6075


kennytm@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #3 from kennytm@gmail.com 2011-06-27 07:27:32 PDT ---
https://github.com/D-Programming-Language/dmd/commit/dfb683f6#L2R9400

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