diff options
author | Araq <rumpf_a@web.de> | 2014-08-19 22:35:16 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-19 22:35:16 +0200 |
commit | ebe313e627d0184596cc7af6d49fa0814ec407d0 (patch) | |
tree | 287b0f3e3f6ccc42444438103495b0eb261d8172 /tests | |
parent | 7ef076a04afa7201ab945eecfe2386d14c5084a7 (diff) | |
download | Nim-ebe313e627d0184596cc7af6d49fa0814ec407d0.tar.gz |
fixes #1334
Diffstat (limited to 'tests')
-rw-r--r-- | tests/misc/tvarious1.nim | 9 |
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 |