This commit is contained in:
konsumlamm 2021-01-31 01:00:18 +01:00 • committed by GitHub
commit eef2948ec2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -256,7 +256,7 @@ discard foo()
type
IteratorF*[In] = iterator() : In {.closure.}
template foof(In: untyped) : untyped =
template foof(In: untyped) : untyped =
proc ggg*(arg: IteratorF[In]) =
for i in arg():
echo "foo"
@ -265,7 +265,7 @@ template foof(In: untyped) : untyped =
iterator hello() : int {.closure.} =
for i in 1 .. 3:
yield i
foof(int)
ggg(hello)
@ -290,3 +290,9 @@ proc bar(t: var int) =
foo(bar)
block: # bug #12595
template test() =
let i = 42
discard {i: ""}
test()