www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4496] New: aa.get broken when using get and opIndexAssign in same statement

reply d-bugmail puremagic.com writes:
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: sean invisibleduck.org
        ReportedBy: dsimcha yahoo.com



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: -------
Jul 23 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4496


David Simcha <dsimcha yahoo.com> changed:

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



Fixed at some point in the past.  Can't reproduce anymore.

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