Add testcase for #4722 (#14954)

This commit is contained in:
Clyybber
2020-07-10 17:02:49 +02:00
committed by GitHub
parent 229a623849
commit b21782a667

View File

@@ -8,6 +8,9 @@ hi
Hello, World!
(e: 42)
hey
foo
foo
foo
'''
"""
@@ -245,3 +248,21 @@ proc foo(): auto =
echo "hey"
discard foo()
# bug #4722
type
IteratorF*[In] = iterator() : In {.closure.}
template foof(In: untyped) : untyped =
proc ggg*(arg: IteratorF[In]) =
for i in arg():
echo "foo"
iterator hello() : int {.closure.} =
for i in 1 .. 3:
yield i
foof(int)
ggg(hello)