summary refs log tree commit diff stats
path: root/tests/macros/tbug1149.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/macros/tbug1149.nim')
-rw-r--r--tests/macros/tbug1149.nim20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/macros/tbug1149.nim b/tests/macros/tbug1149.nim
new file mode 100644
index 000000000..5c4cb8530
--- /dev/null
+++ b/tests/macros/tbug1149.nim
@@ -0,0 +1,20 @@
+discard """
+msg: '''a
+s
+d
+f'''
+"""
+
+type
+  Foo = object
+    s: char
+
+iterator test2(f: string): Foo =
+  for i in f:
+    yield Foo(s: i)
+
+macro test(): stmt =
+  for i in test2("asdf"):
+    echo i.s
+
+test()