Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f986157749de99684d5ea0efb4c901b9094214a655729dc5dad2df57d1bee312
Ticket: ba6ab5eb7be965011159dc04a57820b69877ef16
[return -code] behaviour depends on how coroutine was started
User & Date: aspect on 2020-07-05 13:41:16
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed 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.
    
  5. foundin changed to: "8.6.10"
  6. is_private changed to: "0"
  7. login: "aspect"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "aspect"
  13. subsystem changed to: "60. NRE and coroutines"
  14. title changed to:
    [return -code] behaviour depends on how coroutine was started
    
  15. type changed to: "Bug"