summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-23 14:35:46 +0200
committerGitHub <noreply@github.com>2016-08-23 14:35:46 +0200
commit26bb2f673f880ba17d497a21837ca982c66d26f5 (patch)
tree7fec587ec7e4e5482ee3aa5c7e72b533cc99af21
parent660e4e71237bb8260028ef1220855df841f2bf7e (diff)
parent2ee88fef53b361efe15c12ca5e2c7c75fef23c69 (diff)
downloadNim-26bb2f673f880ba17d497a21837ca982c66d26f5.tar.gz
Merge pull request #4650 from def-/devel
Get rid of initialization warning
-rw-r--r--lib/system.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 82980d9da..356248e6c 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -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]) =
@@ -3681,4 +3681,4 @@ when defined(nimconfig):
 when defined(windows) and appType == "console" and not defined(nimconfig):
   proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32",
     importc: "SetConsoleOutputCP".}
-  discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage
\ No newline at end of file
+  discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage