diff options
Diffstat (limited to 'tests/vm')
-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) |