From 4d4ac62d40d5b40cda5907fe8d5e7e013b6cc68f Mon Sep 17 00:00:00 2001 From: flaviut Date: Mon, 26 May 2014 12:11:56 -0400 Subject: [PATCH 1/2] Add test for #1149 --- tests/macros/tbug1149.nim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/macros/tbug1149.nim diff --git a/tests/macros/tbug1149.nim b/tests/macros/tbug1149.nim new file mode 100644 index 0000000000..5c4cb85309 --- /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() From 2fcc911a9420cab3567cc2f4e95f84893e3ce847 Mon Sep 17 00:00:00 2001 From: flaviut Date: Mon, 26 May 2014 13:50:08 -0400 Subject: [PATCH 2/2] Enable disabled test --- tests/macros/tdumptree.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/macros/tdumptree.nim b/tests/macros/tdumptree.nim index 5299a94e33..e5160b7ba7 100644 --- a/tests/macros/tdumptree.nim +++ b/tests/macros/tdumptree.nim @@ -1,6 +1,5 @@ discard """ -disabled: true -output: '''StmtList +msg: '''StmtList VarSection IdentDefs Ident !"x"