diff options
author | Araq <rumpf_a@web.de> | 2014-04-07 14:21:33 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-04-07 14:21:33 +0200 |
commit | abb701082065334fd171aaa05c530b611c5aef50 (patch) | |
tree | 296d4ccb052b17aaad42e84dd2e635b4abdf6eab /tests | |
parent | 1b97fcd448c8dea9dbb5cf7418592b973e246410 (diff) | |
download | Nim-abb701082065334fd171aaa05c530b611c5aef50.tar.gz |
fixes #1063
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vm/tarrayboundeval.nim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/vm/tarrayboundeval.nim b/tests/vm/tarrayboundeval.nim new file mode 100644 index 000000000..9b33a2415 --- /dev/null +++ b/tests/vm/tarrayboundeval.nim @@ -0,0 +1,23 @@ +discard """ + output: '''7 +8 8''' +""" + +#bug 1063 + +const + KeyMax = 227 + myconst = int((KeyMax + 31) / 32) + +type + FU = array[int((KeyMax + 31) / 32), cuint] + +echo FU.high + +type + PKeyboard* = ptr object + TKeyboardState* = object + display*: pointer + internal: array[int((KeyMax + 31)/32), cuint] + +echo myconst, " ", int((KeyMax + 31) / 32) |