summary refs log tree commit diff stats
path: root/tests/run
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run')
-rw-r--r--tests/run/tstaticparams.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run/tstaticparams.nim b/tests/run/tstaticparams.nim
new file mode 100644
index 000000000..3e501ed8b
--- /dev/null
+++ b/tests/run/tstaticparams.nim
@@ -0,0 +1,17 @@
+discard """
+  file: "tstaticparams.nim"
+  output: "abracadabra\ntest"
+"""
+
+type 
+  TFoo[T; Val: expr[string]] = object
+    data: array[4, T]
+
+proc takeFoo(x: TFoo) =
+  echo "abracadabra"
+  echo TFoo.Val
+
+var x: TFoo[int, "test"]
+
+takeFoo(x)
+