Bug 15902 – std.range.Take.opSlice is incorrect

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2016-04-09T07:30:00Z
Last change time
2016-08-20T01:01:06Z
Assigned to
nobody
Creator
vlevenfeld

Comments

Comment #0 by vlevenfeld — 2016-04-09T07:30:57Z
std/range/package.d : L1842 source[i..j-i] should be source[i..j] Otherwise you would have xs.take(5)[2..3] => xs[2..1]
Comment #1 by cauterite — 2016-08-20T01:01:06Z