Merge pull request #1231 from flaviut/test1149

Add test for #1149
This commit is contained in:
Andreas Rumpf
2014-05-29 01:58:39 +02:00
2 changed files with 21 additions and 2 deletions

20
tests/macros/tbug1149.nim Normal file
View File

@@ -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()

View File

@@ -1,6 +1,5 @@
discard """
disabled: true
output: '''StmtList
msg: '''StmtList
VarSection
IdentDefs
Ident !"x"