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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun May 23 10:59:42 PDT 2010


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 at puremagic.com
        ReportedBy: zan77137 at nifty.com


--- Comment #0 from SHOO <zan77137 at nifty.com> 2010-05-23 10:59:40 PDT ---
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: -------


More information about the Digitalmars-d-bugs mailing list