Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b56a425810faa79571561f02a6b8dc7d60a3ade4
Ticket: 449279ffffffffffffffffffffffffffffffffff
[namespace which -var] ignores aliases
User & Date: dgp on 2001-08-09 06:36:49
Changes

  1. icomment:
    Logged In: YES 
    user_id=80530
    
    After chat discussions with Miguel, it seems
    there's both a bug and a feature request here.
    
    [namespace which -variable] should reflect the
    actual resolution rules.  As is, when called
    inside a proc, it doesn't examine the local context
    at all.  Also, when the variable name does not
    contain any namespace qualifiers, it's resolution
    will not involve other namespaces at all, yet
    [namespace which -var] will still act like it does.
    
    In the example, it would be better to see
    
    % bar::test
    x is x
    
    Indicating that in the context of the body of
    proc [bar::test], "x" is a local variable, and
    won't be resolved in other namespaces.
    
    In addition, we need the ability to determine the
    ultimate reference of local variables that are
    really aliases created by [upvar], [variable],
    etc.  That's the Feature Request part, and will
    need some thinking.  (What about references to
    other proc contexts?, etc.)
    
    
  2. login: "dgp"
  3. mimetype: "text/plain"
  4. username: "dgp"