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
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/41c2d14658817419cb335a42656130b7aa2959f6 Fix Issue 16442 - FrontTransversal fails with empty ranges https://github.com/dlang/phobos/commit/68c77e1358050443ac295a60812055a56c70ff84 Merge pull request #5091 from RazvanN7/Issue_16442 Fix Issue 16442 - FrontTransversal fails with empty ranges
Comment #2 by github-bugzilla — 2017-02-24T18:15:43Z
Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/41c2d14658817419cb335a42656130b7aa2959f6 Fix Issue 16442 - FrontTransversal fails with empty ranges https://github.com/dlang/phobos/commit/68c77e1358050443ac295a60812055a56c70ff84 Merge pull request #5091 from RazvanN7/Issue_16442
Comment #3 by github-bugzilla — 2017-03-22T12:22:04Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/41c2d14658817419cb335a42656130b7aa2959f6 Fix Issue 16442 - FrontTransversal fails with empty ranges https://github.com/dlang/phobos/commit/68c77e1358050443ac295a60812055a56c70ff84 Merge pull request #5091 from RazvanN7/Issue_16442