summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-23 23:08:35 +0200
committerGitHub <noreply@github.com>2018-09-23 23:08:35 +0200
commitfedd695d76e621bfbbaca4bbc8f66996a0a732a4 (patch)
tree6b82f41e4fec287bdbf8f23c90144a356e2b3211 /tests
parent179791aa9a3d7e47883b07852025776cf5e7b9aa (diff)
parentfb54f394e8c9a8ca07b8eb952b8f9eaa1ce66005 (diff)
downloadNim-fedd695d76e621bfbbaca4bbc8f66996a0a732a4.tar.gz
Merge pull request #9046 from LemonBoy/fix-9043
Fix for VM codegen with static[T] types
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/t9043.nim10
1 files changed, 10 insertions, 0 deletions
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])