Another regression: std.range.slide
H. S. Teoh
hsteoh at qfbox.info
Thu Jun 15 19:18:03 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23976
Caused by: https://github.com/dlang/phobos/pull/8738
(commit 8a9cfa2677)
Brief summary:
-----------
import std;
void main() {
auto input = "1<2";
foreach (pair; input.splitter("<").slide(2))
{
writeln(pair);
}
}
-----------
Output before commit 8a9cfa2677:
-----------
["1", "2"]
-----------
Output after commit 8a9cfa2677:
-----------
["1", "2"]
["2"]
-----------
This is incorrect because the code asked for a window of size 2, with
the default option of No.withPartial.
This broke another of my old projects that relied on the old (correct)
behaviour. :-/
T
--
There are three kinds of people in the world: those who can count, and those who can't.
More information about the Digitalmars-d
mailing list