Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 97fa3f30c255b7d9b1a85b430b2fd9a6288e1119
Ticket: 2649975fffffffffffffffffffffffffffffffff
bizarre interaction of uplevel and tailcall
User & Date: kennykb on 2009-02-28 23:20:34
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    I'm struggling to come up with a smaller example of this
    problem; it's quite nasty.
    
    When the attached 'bugg.tcl' script is run, it
    produces the output,
    
    v should have been found at global level but was found in bar's method bravo
    
    Removing the line:
    
    proc dump args {}
    
    from the script makes it print a play-by-play analysis of what happened.
    
    It appears that everything is working fine right up to the very end, when the last [tailcall] invokes
    
    ::grill create betty
    
    That constructor runs at level 2, despite having been tailcalled from level 1, and causing [upvar 1 v w] to resolve in the wrong callframe.
    
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "7 High"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "kennykb"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to:
    bizarre interaction of uplevel, tailcall, method invocation
    
  12. type changed to: "Bug"