[Issue 6075] New: Cannot set value to associative array from a weakly-pure function when the value type has a (pure) opAssign
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 29 09:05:54 PDT 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 at puremagic.com
ReportedBy: kennytm at gmail.com
--- Comment #0 from kennytm at 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: -------
More information about the Digitalmars-d-bugs
mailing list