| Ticket UUID: | 53ac20f94bd0a749e9688fcdf8ed07f376c80c6a | ||
| Title: | namespace(n) documentation doesn't reflect TIP#278 changes | ||
| Type: | Bug | Created on: | 2024-05-24 23:49:37 |
| Submitter: | emiliano | Assigned to: | jan.nijtmans |
| Subsystem: | - New Builtin Commands | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2024-07-01 16:34:49 |
| Status: | Closed | Closed by: | bhaible |
| Resolution: | Fixed | Closed on: | 2024-07-01 16:34:49 |
| Version: | 9.0 | ||
| Description: | ||||
With Tcl 9 variable resolution behaves as stated on TIP#278
$ cat varresolv.tcl
namespace eval a {variable a; set a ""}
namespace eval b {proc b {} {namespace which -variable a::a}}
puts [b::b]
$ tclsh8.6 varresolv.tcl
::a::a
$ tclsh9.0 varresolv.tcl
$
However, namespace(n) still reads
ยท Variable names are always resolved by looking first in the current namespace, and then in the global namespace.
| ||||
| User Comments: | ||||
jan.nijtmans added on 2024-06-13 13:13:14:
Proposed fix [e7ea82171dd08f11|here] Please review (anyone). apnadkarni added on 2024-06-19 10:15:18:
Changes look reasonable to me. jan.nijtmans added on 2024-06-19 11:05:28:
Thanks for the review! bhaible added on 2024-07-01 16:34:49:
It is not yet published at https://www.tcl.tk/man/tcl9.0/TclCmd/namespace.html#M26 . | ||||
