Add test for #1149
This commit is contained in:
parent
97fa3391f2
commit
4d4ac62d40
1 changed files with 20 additions and 0 deletions
20
tests/macros/tbug1149.nim
Normal file
20
tests/macros/tbug1149.nim
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue