summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-08-19 22:35:16 +0200
committerAraq <rumpf_a@web.de>2014-08-19 22:35:16 +0200
commitebe313e627d0184596cc7af6d49fa0814ec407d0 (patch)
tree287b0f3e3f6ccc42444438103495b0eb261d8172 /tests
parent7ef076a04afa7201ab945eecfe2386d14c5084a7 (diff)
downloadNim-ebe313e627d0184596cc7af6d49fa0814ec407d0.tar.gz
fixes #1334
Diffstat (limited to 'tests')
-rw-r--r--tests/misc/tvarious1.nim9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/misc/tvarious1.nim b/tests/misc/tvarious1.nim
index 6e4612ae3..1f2da2ae5 100644
--- a/tests/misc/tvarious1.nim
+++ b/tests/misc/tvarious1.nim
@@ -3,7 +3,8 @@ discard """
   output: '''1
 0
 Whopie
-12'''
+12
+1.7'''
 """
 
 echo len([1_000_000]) #OUT 1
@@ -39,3 +40,9 @@ var val12 = TSomeRange(hour: 12)
 
 value = $(if val12.hour > 12: val12.hour - 12 else: val12.hour)
 echo value
+
+# bug #1334
+
+var ys = @[4.1, 5.6, 7.2, 1.7, 9.3, 4.4, 3.2] 
+#var x = int(ys.high / 2) #echo ys[x] # Works 
+echo ys[int(ys.high / 2)] # Doesn't work