This commit is contained in:
Yuriy Glukhov 2018-09-04 09:18:11 +03:00 • committed by Andreas Rumpf
commit d2eea9e1c9
2 changed files with 16 additions and 3 deletions

View file

@ -403,5 +403,18 @@ block: # yield in blockexpr
test(it, 1, 2, 3)
block: #8851
type
Foo = ref object of RootObj
template someFoo(): Foo =
var f: Foo
yield 1
f
iterator it(): int {.closure.} =
var o: RootRef
o = someFoo()
test(it, 1)
echo "ok"