[Issue 23976] std.range.slide fails in dmd-2.104.0
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 15 19:12:42 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23976
hsteoh at qfbox.info changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hsteoh at qfbox.info
Severity|enhancement |regression
--- Comment #2 from hsteoh at qfbox.info ---
Ran into a similar problem today:
-----------
import std;
void main() {
auto input = "1<2";
foreach (pair; input.splitter("<").slide(2))
{
writeln(pair);
}
}
-----------
Expected output:
-----------
["1", "2"]
-----------
Actual output:
-----------
["1", "2"]
["2"]
-----------
Digging into git history reveals that this is a regression caused by Phobos PR
#8738 (commit 8a9cfa2677). Rolling back Phobos to the commit before 8a9cfa2677
causes the correct output to be produced.
--
More information about the Digitalmars-d-bugs
mailing list