[Issue 7948] New: std.range.zip broken with requireSameLength
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 20 07:01:20 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7948
Summary: std.range.zip broken with requireSameLength
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: jens.k.mueller at gmx.de
--- Comment #0 from jens.k.mueller at gmx.de 2012-04-20 07:02:16 PDT ---
unittest
{
import std.algorithm;
import std.range;
int[] a = [ 1, 2, 3 ];
string[] b = [ "a", "b", "c" ];
sort!("a[0] > b[0]")(zip(StoppingPolicy.requireSameLength, a, b));
assert(a == [ 3, 2, 1 ]);
assert(b == [ "c", "b", "a" ]);
}
fails with
phobos/std/range.d(3563): Invalid Zip object
but is expected to pass (the provided ranges have the same length). The
checking code in range.d is wrong.
--
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