diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-03-09 22:15:11 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-03-09 22:15:11 +0200 |
commit | 3dcf735482bed528f80614dca7a096f5e1a3aaa4 (patch) | |
tree | 6dcad46f73f3d8d1f364a1db521ec774585d82ef /tests/template | |
parent | 29b7104a5330ebcb188243a271b4409e8613837b (diff) | |
download | Nim-3dcf735482bed528f80614dca7a096f5e1a3aaa4.tar.gz |
fix #909
Diffstat (limited to 'tests/template')
-rw-r--r-- | tests/template/tissue909.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/template/tissue909.nim b/tests/template/tissue909.nim new file mode 100644 index 000000000..5b57a3558 --- /dev/null +++ b/tests/template/tissue909.nim @@ -0,0 +1,16 @@ +import macros + +template baz() = + proc bar() = + var x = 5 + iterator foo(): int {.closure.} = + echo x + var y = foo + discard y() + +macro test(): stmt = + result = getAst(baz()) + echo(treeRepr(result)) + +test() +bar() |