www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4228] New: std.array.replace contains 2 bugs

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4228

           Summary: std.array.replace contains 2 bugs
           Product: D
           Version: 2.041
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: zan77137 nifty.com



1. std.array.replace cannot receive null

It should run following code:
----------
int[] a = [1, 4, 5];
replace(a, 1u, 2u, null);
assert(a == [1, 5]);
----------


2. std.array.replace have strange behavior when array.length shrinks.

It should run following code:
----------
int[] a = [1, 4, 5];
replace(a, 1u, 4u, [2]);
assert(a == [1, 2]);
----------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 23 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4228


SHOO <zan77137 nifty.com> changed:

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



Fixed in svn r1547.

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