diff options
author | Araq <rumpf_a@web.de> | 2018-02-10 14:09:04 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-02-10 14:09:04 +0100 |
commit | 5c5e54d3a9b80c4d472a44e3b79b11d74cf3d1a8 (patch) | |
tree | 7653e8e82aceac07c9dfb130dbc87de70abf9492 /tests | |
parent | 7b2b0ebf7fc7c6276f973f82424f7328823e221c (diff) | |
download | Nim-5c5e54d3a9b80c4d472a44e3b79b11d74cf3d1a8.tar.gz |
fixes #7153
Diffstat (limited to 'tests')
-rw-r--r-- | tests/array/tarrindx.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/array/tarrindx.nim b/tests/array/tarrindx.nim index a8d72b338..3bb6b0148 100644 --- a/tests/array/tarrindx.nim +++ b/tests/array/tarrindx.nim @@ -1,3 +1,8 @@ +discard """ + output: '''0 +0''' +""" + # test another strange bug ... (I hate this compiler; it is much too buggy!) proc putEnv(key, val: string) = @@ -11,3 +16,16 @@ proc putEnv(key, val: string) = env[len(key)] = '=' for i in 0..len(val)-1: env[len(key)+1+i] = val[i] + +# bug #7153 +const + UnsignedConst = 1024'u +type + SomeObject* = object + s1: array[UnsignedConst, uint32] + +var + obj: SomeObject + +echo obj.s1[0] +echo obj.s1[0u] |