Index: TODO =================================================================== diff -u -rd1916d543ed083b100c8f9c48dd987d92c4bdb95 -r1a79d773d2d60c43bacefd3e6e87ba1ba38f46d5 --- TODO (.../TODO) (revision d1916d543ed083b100c8f9c48dd987d92c4bdb95) +++ TODO (.../TODO) (revision 1a79d773d2d60c43bacefd3e6e87ba1ba38f46d5) @@ -1565,7 +1565,7 @@ - extend coro regression test - subcmd - * handle sucmd for other method factories + * handle subcmd for other method factories * handle absence of -create flag in resolve_method_path (for introspection) - interfaces in documentation for slots (see for more details Index: tests/tcl86.tcl =================================================================== diff -u -rd137fce76cdcb71cb10ea76a24e480923124d12c -r1a79d773d2d60c43bacefd3e6e87ba1ba38f46d5 --- tests/tcl86.tcl (.../tcl86.tcl) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) +++ tests/tcl86.tcl (.../tcl86.tcl) (revision 1a79d773d2d60c43bacefd3e6e87ba1ba38f46d5) @@ -4,11 +4,14 @@ # just 8.6 or similar if {[info command yield] eq ""} return -Test case coro-generator { - # =================================== - # nx coro - # =================================== +# +# Test coroutine / yield +# +Test case number-generator { + nx::Object create numbers { + + # set instance variable used in coroutine set :delta 2 :public method ++ {} { @@ -20,12 +23,17 @@ } } } - + + # create coroutine coroutine nextNumber numbers ++ set ::j 0 + + # use coroutine for {set i 0} {$i < 10} {incr i} { incr ::j [nextNumber] } + + # remove coroutine rename nextNumber {} ? {set ::j} 90