diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-05-26 22:15:30 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-05-26 22:15:30 +0300 |
commit | 66653e8f144f2e67a6e48158f9298d9f41b16b09 (patch) | |
tree | 2319ea9006ff878d2dfc47fbd086c35657b0d288 /tests/run | |
parent | 911e6e710f28f454cf8bc1bb493c1a28c4694b76 (diff) | |
download | Nim-66653e8f144f2e67a6e48158f9298d9f41b16b09.tar.gz |
test cases for the new features
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/tstaticparams.nim | 17 |
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) + |