mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
20 lines
244 B
Nim
20 lines
244 B
Nim
|
|
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
|