mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-21 08:21:32 +00:00
fix #909
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user