Artifacts Associated With Ticket ba6ab5eb7be96501
Ticket change [f986157749] (rid 184342) by aspect on 2020-07-05 13:41:16:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Setup: % info patch 8.6.10 % proc gen {} {yield; return -code break} As expected: % apply {{} {coroutine t1 gen}} % while 1 t1 Bug: % coroutine t2 gen % while 1 t2 invoked "break" outside of a loop while executing "gen" invoked from within "t2" ("while" body line 1) invoked from within "while 1 t2" As a workaround, using [tailcall break] in place of [return -code break] works. - foundin initialized to: "8.6.10"
- is_private initialized to: "0"
- login: "aspect"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "aspect"
- subsystem initialized to: "60. NRE and coroutines"
- title initialized to:
[return -code] behaviour depends on how coroutine was started
- type initialized to: "Bug"
Ticket change [20dd04dfc0] (rid 184343) by aspect on 2020-07-05 14:26:14:
- icomment:
The plot thickens: Works as a script: $ tclsh <(echo 'proc t {} {yield 1 ; tailcall break} ; coroutine t1 t ; while 1 {puts [t1]}') Fails interactively: $ tclsh < <(echo 'proc t {} {yield 1 ; tailcall break} ; coroutine t1 t ; while 1 {puts [t1]}') invoked "break" outside of a loop - login: "aspect"
- mimetype: "text/plain"
- icomment: