summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system.nim')
-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