Merge pull request #4650 from def-/devel

Get rid of initialization warning
This commit is contained in:
Andreas Rumpf 2016-08-23 14:35:46 +02:00 • committed by GitHub
commit 26bb2f673f

View file

@ -3232,7 +3232,7 @@ proc `[]`*[Idx, T](a: array[Idx, T], x: Slice[int]): seq[T] =
when low(a) < 0:
{.error: "Slicing for arrays with negative indices is unsupported.".}
var L = x.b - x.a + 1
newSeq(result, L)
result = newSeq[T](L)
for i in 0.. <L: result[i] = a[i + x.a]
proc `[]=`*[Idx, T](a: var array[Idx, T], x: Slice[int], b: openArray[T]) =