From 66653e8f144f2e67a6e48158f9298d9f41b16b09 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sun, 26 May 2013 22:15:30 +0300 Subject: test cases for the new features --- tests/run/tstaticparams.nim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/run/tstaticparams.nim (limited to 'tests/run') 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) + -- cgit 1.4.1-2-gfad0