summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-07-12 10:11:59 +0200
committerAraq <rumpf_a@web.de>2019-07-12 10:11:59 +0200
commiteaf4b42ff99b4e7bd77232dc53035e93682aaa73 (patch)
treee3624c91f4e2b778d58f0909dde6dfaa04b498a8 /lib
parent511b6ae27c1aae27c3f7bb8aed83245a752d4f4c (diff)
downloadNim-eaf4b42ff99b4e7bd77232dc53035e93682aaa73.tar.gz
JS codegen: supports toOpenArray [bugfix]
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 966375445..61fb6ec03 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -4484,18 +4484,19 @@ when defined(windows) and appType == "console" and defined(nimSetUtf8CodePage) a
   discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage
 
 when not defined(js):
-  proc toOpenArray*[T](x: seq[T]; first, last: int): openArray[T] {.
-    magic: "Slice".}
-  proc toOpenArray*[T](x: openArray[T]; first, last: int): openArray[T] {.
-    magic: "Slice".}
   proc toOpenArray*[T](x: ptr UncheckedArray[T]; first, last: int): openArray[T] {.
     magic: "Slice".}
-  proc toOpenArray*[I, T](x: array[I, T]; first, last: I): openArray[T] {.
-    magic: "Slice".}
-  proc toOpenArray*(x: string; first, last: int): openArray[char] {.
-    magic: "Slice".}
-  proc toOpenArrayByte*(x: string; first, last: int): openArray[byte] {.
-    magic: "Slice".}
+
+proc toOpenArray*[T](x: seq[T]; first, last: int): openArray[T] {.
+  magic: "Slice".}
+proc toOpenArray*[T](x: openArray[T]; first, last: int): openArray[T] {.
+  magic: "Slice".}
+proc toOpenArray*[I, T](x: array[I, T]; first, last: I): openArray[T] {.
+  magic: "Slice".}
+proc toOpenArray*(x: string; first, last: int): openArray[char] {.
+  magic: "Slice".}
+proc toOpenArrayByte*(x: string; first, last: int): openArray[byte] {.
+  magic: "Slice".}
 
 type
   ForLoopStmt* {.compilerproc.} = object ## \