Bug 4496 – aa.get broken when using get and opIndexAssign in same statement

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-07-23T13:55:00Z
Last change time
2011-08-12T20:39:56Z
Assigned to
sean
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2010-07-23T13:55:05Z
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"])); }
Comment #1 by dsimcha — 2011-08-12T20:39:56Z
Fixed at some point in the past. Can't reproduce anymore.