Bug 16442 – FrontTransversal fails with empty ranges
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-08-28T15:34:00Z
Last change time
2017-03-22T12:22:04Z
Keywords
trivial
Assigned to
nobody
Creator
gruen_tobias
Comments
Comment #0 by gruen_tobias — 2016-08-28T15:34:29Z
If the input ROR of FrontTransversal consists of empty ranges
and the option assumeNotJagged || enforceNotJagged is set, the return value of empty is wrong.
===
int[][] arr = [[], []];
auto ft = frontTransversal!(TransverseOptions.assumeNotJagged)(arr);
foreach(elem; ft) // fails here..
{
}
===
Will Throw a
core.exception.AssertError:"Attempting to fetch the front of an empty array of int"
Comment #1 by github-bugzilla — 2017-02-11T00:00:15Z