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: nob...@puremagic.com ReportedBy: jens.k.muel...@gmx.de --- Comment #0 from jens.k.muel...@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: -------