From 204369845a4e55c63367256a0dc2653f53b44e4c Mon Sep 17 00:00:00 2001 From: flywind <43030857+xflywind@users.noreply.github.com> Date: Fri, 27 Nov 2020 18:57:16 +0800 Subject: [PATCH] add testcase (#16156) (cherry picked from commit 3510216c8afeee36e2997bd0f20a2b5f3c70a260) --- tests/statictypes/tstatictypes.nim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/statictypes/tstatictypes.nim b/tests/statictypes/tstatictypes.nim index fe1d1c8ca669..f3a0f0fcb808 100644 --- a/tests/statictypes/tstatictypes.nim +++ b/tests/statictypes/tstatictypes.nim @@ -357,3 +357,12 @@ proc fn(N1: static int, N2: static int, T: typedesc): array[N1 * N2, T] = doAssert(len(result) == N1 * N2) let yy = fn(5, 10, float) + + +block: + block: + type Foo[N: static int] = array[cint(0) .. cint(N), float] + type T = Foo[3] + block: + type Foo[N: static int] = array[int32(0) .. int32(N), float] + type T = Foo[3]