Bug 4228 – std.array.replace contains 2 bugs

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-05-23T10:59:00Z
Last change time
2014-02-15T02:43:56Z
Assigned to
nobody
Creator
zan77137

Comments

Comment #0 by zan77137 — 2010-05-23T10:59:40Z
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]); ----------
Comment #1 by zan77137 — 2010-05-23T11:11:30Z
Fixed in svn r1547.