Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-08-29
19:25
Merge [23874775c9c1dc0a]: Fix [53ac20f94b]: namespace(n) documentation doesn't reflect TIP#278 chang... check-in: a398290a11 user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE
2024-07-01
16:34 • Ticket [53ac20f94b] namespace(n) documentation doesn't reflect TIP#278 chang... artifact: 4c7339265c user: bhaible
2024-06-19
11:05 • Closed ticket [53ac20f94b]. artifact: f2c9d8121b user: jan.nijtmans
11:04
Fix [53ac20f94b]: namespace(n) documentation doesn't reflect TIP#278 changes check-in: 23874775c9 user: jan.nijtmans tags: trunk, main
10:15 • Ticket [53ac20f94b] namespace(n) documentation doesn't reflect TIP#278 chang... artifact: 2b999cdc02 user: apnadkarni
2024-06-13
13:13 • Pending ticket [53ac20f94b]. artifact: 83bc55f890 user: jan.nijtmans
13:12
Proposed fix for [53ac20f94b]: namespace(n) documentation doesn't reflect TIP#278 changes closed check-in: e7ea82171d user: jan.nijtmans tags: bug-53ac20f94b
2024-05-24
23:49 • New ticket [53ac20f94b] namespace(n) documentation doesn't reflect TIP#278 c... artifact: a08765f6b9 user: emiliano

namespace(n) documentation doesn't reflect TIP#278 changes

Closed / Fixed53ac20f94bd0a749e9688fcdf8ed07f376c80c6aCreated 3 years agoUpdated 2 years ago
Descriptionplain2024-05-24 23:49:37
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.
Referenced by3
jan.nijtmanswiki2024-06-13 13:13:14

Proposed fix [here]

Please review (anyone).

apnadkarniplain2024-06-19 10:15:18
Changes look reasonable to me.
jan.nijtmanswiki2024-06-19 11:05:28

Thanks for the review!

bhaiblemarkdown2024-07-01 16:34:49

It is not yet published at https://www.tcl.tk/man/tcl9.0/TclCmd/namespace.html#M26 .

Log in (anonymous is fine) to add a comment.