From fb54f394e8c9a8ca07b8eb952b8f9eaa1ce66005 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sun, 23 Sep 2018 18:17:00 +0200 Subject: Fix for VM codegen with static[T] types Fixes #9043 --- tests/vm/t9043.nim | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/vm/t9043.nim (limited to 'tests') diff --git a/tests/vm/t9043.nim b/tests/vm/t9043.nim new file mode 100644 index 000000000..1ae2e383c --- /dev/null +++ b/tests/vm/t9043.nim @@ -0,0 +1,10 @@ +discard """ + nimout: "(Field0: 2, Field1: 2, Field2: 2, Field3: 2)" +""" + +proc foo[N: static[int]](dims: array[N, int])= + const N1 = N + const N2 = dims.len + static: echo (N, dims.len, N1, N2) + +foo([1, 2]) -- cgit 1.4.1-2-gfad0