Skip to content
Tcl Source Code View Ticket
Login

View Ticket

[global :v] makes wrong link

Closed / Fixed480176ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2001-11-09 20:43:03
% proc test {} {
      global :v
      set v 1
      set :v 2
}
% test
2
% set :v
1

[global] is linking global variable :v
to local variable v, rather than the
correct local variable :v.

Workaround: [global $varName] should
be equivalent to 
[upvar #0 $varName [namespace tail $varName]]
so one could just define it so.
dgpplain2001-11-10 04:01:56
File Added - 13090: global.patch

Logged In: YES 
user_id=80530

Here's the patch.
dgpplain2001-11-10 06:09:20
Logged In: YES 
user_id=80530

committed patch to HEAD and core-8-3-1-branch
Log in (anonymous is fine) to add a comment.

Attachments: