fix #909
This commit is contained in:
parent
29b7104a53
commit
3dcf735482
3 changed files with 23 additions and 1 deletions
16
tests/template/tissue909.nim
Normal file
16
tests/template/tissue909.nim
Normal file
|
|
@ -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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue