diff options
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/twrapiterator.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/macros/twrapiterator.nim b/tests/macros/twrapiterator.nim new file mode 100644 index 000000000..e153ae980 --- /dev/null +++ b/tests/macros/twrapiterator.nim @@ -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 |