www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15902] New: std.range.Take.opSlice is incorrect


          Issue ID: 15902
           Summary: std.range.Take.opSlice is incorrect
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: vlevenfeld gmail.com

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]

Apr 09 2016