Bug 19289 – std.range.transposed with enforceNotJagged not throwing

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-10-06T14:50:30Z
Last change time
2018-10-06T15:49:10Z
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2018-10-06T14:50:30Z
See https://forum.dlang.org/thread/[email protected] berni wrote: --- I expect this small program to throw an Exception: > import std.stdio; > import std.range; > > void main() > { > auto a = [[1,2], > [4,5,3]]; > > a.transposed!(TransverseOptions.enforceNotJagged).writeln; > } But it just outputs: > [[1, 4], [2, 5], [3]] Is it a bug or is it me who's doing something wrong? ---
Comment #1 by n8sh.secondary — 2018-10-06T14:50:45Z
Comment #2 by github-bugzilla — 2018-10-06T15:49:09Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/aaa00b723289a4bcfde4928eddfa05a8f4b6d5c4 Fix Issue 19289 - std.range.transposed with enforceNotJagged not throwing https://github.com/dlang/phobos/commit/264ab218dc15be2caecb4c95aa6016145f0fca04 Merge pull request #6723 from crocopaw/transposed Fix Issue 19289 - std.range.transposed with enforceNotJagged not throwing merged-on-behalf-of: Nathan Sashihara <[email protected]>