Overview
| Artifact ID: | bb63b5bb2fb17841902bdcad0170cea87bd7594f |
|---|---|
| Ticket: | 449279ffffffffffffffffffffffffffffffffff
[namespace which -var] ignores aliases |
| User & Date: | dgp on 2001-08-08 20:35:15 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
% namespace eval foo variable x 1 % namespace eval bar variable x 2 % proc bar::test {} { variable ::foo::x;# 'x' is now an alias for ;# ::foo::x set x 3;# sets ::foo::x puts "x is [namespace which -variable x]" } % bar::test x is ::bar::x % set bar::x 2 % set foo::x 3 This is not what I expect. I expect [namespace which -variable x] to tell me something about what "x" refers to in the current context. But [namespace which] is completely ignoring the local alias "x" and telling me how it would resolve "x" looking in the current and global namespaces only. That has nothing to do with how operations on "x" will behave, which is what I really want to know. Here the local variable alias was created with [variable], but the same problem exists when local variables are created with [upvar] or just by creating a local variable. As is, [namespace which] is not the tool I need. The tool I need appears to be missing. What I need is the analog of [namespace origin] for variables. - foundin changed to: "obsolete: 8.4a3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "21. [namespace]"
- title changed to: "[namespace which -var] ignores aliases"
- type changed to: "Bug"