Fix for VM codegen with static[T] types

Fixes #9043
This commit is contained in:
LemonBoy 2018-09-23 18:17:00 +02:00
commit fb54f394e8
2 changed files with 13 additions and 3 deletions

10
tests/vm/t9043.nim Normal file
View file

@ -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])