From 5c5e54d3a9b80c4d472a44e3b79b11d74cf3d1a8 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 10 Feb 2018 14:09:04 +0100 Subject: fixes #7153 --- tests/array/tarrindx.nim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') 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] -- cgit 1.4.1-2-gfad0