summary refs log tree commit diff stats
path: root/tests/vm
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-06-30 16:45:55 +0200
committerAraq <rumpf_a@web.de>2014-06-30 16:45:55 +0200
commit678f3d7f5bf7998816431f38604c0b9e0f27c90a (patch)
treedffb9556c4f6502f6670604ccf89d92e8dfeb348 /tests/vm
parent33106884ec8c7b2da65d16c8ef4bb00d80b95855 (diff)
downloadNim-678f3d7f5bf7998816431f38604c0b9e0f27c90a.tar.gz
fixes constant array indexing bug
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/tarrayboundeval.nim10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/vm/tarrayboundeval.nim b/tests/vm/tarrayboundeval.nim
index 9b33a2415..07aac4c4e 100644
--- a/tests/vm/tarrayboundeval.nim
+++ b/tests/vm/tarrayboundeval.nim
@@ -1,6 +1,7 @@
 discard """
   output: '''7
-8 8'''
+8 8
+-2'''
 """
 
 #bug 1063
@@ -21,3 +22,10 @@ type
     internal: array[int((KeyMax + 31)/32), cuint]
     
 echo myconst, " ", int((KeyMax + 31) / 32)
+
+#bug 1304 or something:
+
+const constArray: array [-3..2, int] = [-3, -2, -1, 0, 1, 2]
+
+echo constArray[-2]
+