summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-11-27 18:57:16 +0800
committerGitHub <noreply@github.com>2020-11-27 02:57:16 -0800
commit3510216c8afeee36e2997bd0f20a2b5f3c70a260 (patch)
treee5fd8635b09f9e95bf93929d411206f60f371051
parent6b77e16c6f86e5c05795fe881a25be3d17e9c22a (diff)
downloadNim-3510216c8afeee36e2997bd0f20a2b5f3c70a260.tar.gz
add testcase (#16156)
-rw-r--r--tests/statictypes/tstatictypes.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/statictypes/tstatictypes.nim b/tests/statictypes/tstatictypes.nim
index fe1d1c8ca..f3a0f0fcb 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]