fixes #7093
This commit is contained in:
parent
76df554dc4
commit
6a2b57b4aa
2 changed files with 36 additions and 1 deletions
19
tests/macros/twrapiterator.nim
Normal file
19
tests/macros/twrapiterator.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
import macros
|
||||
|
||||
# bug #7093
|
||||
|
||||
macro foobar(arg: untyped): untyped =
|
||||
let procDef = quote do:
|
||||
proc foo(): void =
|
||||
echo "bar"
|
||||
|
||||
|
||||
result = newStmtList(
|
||||
arg, procDef
|
||||
)
|
||||
|
||||
echo result.repr
|
||||
|
||||
iterator bar(): int {.foobar.} =
|
||||
discard
|
||||
Loading…
Add table
Add a link
Reference in a new issue