This commit is contained in:
Araq 2015-02-01 02:27:19 +01:00
commit ecc3c3bd03
2 changed files with 19 additions and 3 deletions

16
tests/iter/tobj_iter.nim Normal file
View file

@ -0,0 +1,16 @@
# bug #2023
{.deadCodeElim:on.}
type
Obj = object
iter: iterator (): int8 {.closure.}
iterator test(): int8 {.closure.} =
yield 7
proc init():Obj=
result.iter = test
var o = init()
echo(o.iter())