mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
Add test for #1149
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user