summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-10-10 21:03:18 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-10-10 21:03:18 +0200
commit0ead36dae6ab0d4525d2318d19335147ffa0bd3d (patch)
treef5aae1163acc3da37ac0341c6e2fd8bc013de259 /lib/system.nim
parent0803b532f44fc7b0039e31187af76e36828ca89d (diff)
downloadNim-0ead36dae6ab0d4525d2318d19335147ffa0bd3d.tar.gz
Unchecked arrays now have their own type (#9267)
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 94706c525..c9d56de0d 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -253,7 +253,13 @@ type
   seq*{.magic: "Seq".}[T]  ## Generic type to construct sequences.
   set*{.magic: "Set".}[T]  ## Generic type to construct bit sets.
 
-  UncheckedArray* {.unchecked.}[T] = array[0, T]
+when defined(nimUncheckedArrayTyp):
+  type
+    UncheckedArray*{.magic: "UncheckedArray".}[T]
+    ## Array with no bounds checking
+else:
+  type
+    UncheckedArray*{.unchecked.}[T] = array[0,T]
     ## Array with no bounds checking
 
 when defined(nimHasOpt):