https://issues.dlang.org/show_bug.cgi?id=19042
Jon Degenhardt <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |m --- Comment #1 from Jon Degenhardt <[email protected]> --- This bug is triggered when a slice is taken entirely from the pad section at the end of the range. Here's another variation: ---- issue_19042.d ---- import std.range; import std.stdio; void main(string[] args) { auto r = [1, 2, 3, 4].padRight(0, 10); writeln("r[7 .. 9] : ", r[7 .. 9]); } ---- Run ------- $ dmd issue_19042.d $ ./issue_19042 core.exception.RangeError@INSTALLDIR/dmd2-2.084.0/osx/bin/../../src/phobos/std/range/package.d(12868): Range violation ---------------- ??:? _d_arrayboundsp [0x73c2b71] ??:? pure nothrow @nogc @safe std.range.padRight!(int[], int).padRight(int[], int, ulong).Result std.range.padRight!(int[], int).padRight(int[], int, ulong).Result.opSlice(ulong, ulong) [0x73aab65] ??:? _Dmain [0x73aa596] --
