summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorflaviut <tamasflaviu@gmail.com>2014-05-26 12:11:56 -0400
committerflaviut <tamasflaviu@gmail.com>2014-05-26 13:49:23 -0400
commit4d4ac62d40d5b40cda5907fe8d5e7e013b6cc68f (patch)
tree93b3a5833e5a03feacf00fedfff927c77efea485 /tests
parent97fa3391f2e7e8fefe247117bc2da9a848c4fd15 (diff)
downloadNim-4d4ac62d40d5b40cda5907fe8d5e7e013b6cc68f.tar.gz
Add test for #1149
Diffstat (limited to 'tests')
-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()