diff options
author | Zahary Karadjov <zahary@gmail.com> | 2012-04-10 22:32:23 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2012-04-10 22:32:23 +0300 |
commit | 97ab16d46b55aa9a4b2acbc72777fb6a8d5a162f (patch) | |
tree | a03290071c0f4788f6f3484571c1e6f4909501d1 /tests/run | |
parent | a64f03230afa69f2143b0eb159c9294998c5e19b (diff) | |
download | Nim-97ab16d46b55aa9a4b2acbc72777fb6a8d5a162f.tar.gz |
typetraits module and tests
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/ttypetraits.nim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/run/ttypetraits.nim b/tests/run/ttypetraits.nim new file mode 100644 index 000000000..5b683bef0 --- /dev/null +++ b/tests/run/ttypetraits.nim @@ -0,0 +1,24 @@ +discard """ + msg: "int\nstring\nTBar[int]" + output: "int\nstring\nTBar[int]" +""" + +import typetraits + +proc foo(x) = + static: + var t = type(x) + echo t.name + + echo x.type.name + +type + TBar[U] = object + x: U + +var bar: TBar[int] + +foo 10 +foo "test" +foo bar + |