parent
229a623849
commit
b21782a667
1 changed files with 21 additions and 0 deletions
|
|
@ -8,6 +8,9 @@ hi
|
||||||
Hello, World!
|
Hello, World!
|
||||||
(e: 42)
|
(e: 42)
|
||||||
hey
|
hey
|
||||||
|
foo
|
||||||
|
foo
|
||||||
|
foo
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -245,3 +248,21 @@ proc foo(): auto =
|
||||||
echo "hey"
|
echo "hey"
|
||||||
|
|
||||||
discard foo()
|
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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue