Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 949c120e9f812590c484d001cb435ce912b3baa4
Ticket: 1546833fffffffffffffffffffffffffffffffff
wrong varname resolution in [namespace upvar]?
User & Date: msofer on 2006-08-26 19:54:29
Changes

  1. closedate changed to: "2006-08-26T12:54:29"
  2. closer changed to: "msofer"
  3. icomment:
    Logged In: YES 
    user_id=148712
    
    [namespace upvar] is doing the right thing: the man page for
    'namespace' clearly states that "Namespace names, on the
    other hand, are always resolved by looking in only the
    current namespace."
    
    So this is actually a doc bug - the parallel to [upvar 0] is
    imperfect. This is now fixed in HEAD.
    
    There was an actual bug in the code (also fixed in HEAD),
    illustrated by
    
    % namespace eval a {
       variable x 2
       proc a {} {namespace upvar fake x w; set w}
       a
    }
    2
    
    This now properly returns an error, with message 
       namespace "fake" does not exist
    (see test upvar-NS-1.9)
    
    
  4. login: "msofer"
  5. mimetype: "text/plain"
  6. resolution changed to: "Fixed"
  7. status changed to: "Closed"
  8. title changed to: "wrong varname resolution in [namespace upvar]?"
  9. username: "msofer"