summary refs log tree commit diff stats
path: root/tests/macros
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-01-18 11:40:18 +0100
committerAndreas Rumpf <rumpf_a@web.de>2018-01-18 11:40:18 +0100
commit6a2b57b4aac7d1a411bb8782523c3094774c4b09 (patch)
tree3a1e295d519e2310064aaefc247fab996757af20 /tests/macros
parent76df554dc46a739e31c2b57f675475e51b2f1fff (diff)
downloadNim-6a2b57b4aac7d1a411bb8782523c3094774c4b09.tar.gz
fixes #7093
Diffstat (limited to 'tests/macros')
-rw-r--r--tests/macros/twrapiterator.nim19
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