http://d.puremagic.com/issues/show_bug.cgi?id=4496
Summary: aa.get broken when using get and opIndexAssign in same
statement
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: druntime
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from David Simcha <[email protected]> 2010-07-23 13:55:05 PDT ---
import std.stdio, std.contracts, std.conv;
void main() {
int[string] aa;
aa["foo"] = aa.get("foo", 5);
// This fails because aa["foo"] ends up being 0.
enforce(aa["foo"] == 5, text(aa["foo"]));
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------