Artifact 16f9feb9c857760c83d68e00f491a81f9802ee884e8541bf845eabb86eee6a98:
- File typeparse/tests_tclsh/t62_liens_ecriture.out — part of check-in [afa40f8750] at 2026-10-23 09:56:21 on branch tip-764_tcl90 — This issue had already been fixed in the code; all that remained was to write the documentation, which is now done. I also identified a limitation, which I have noted in the project plan. Existing functionality Since v14, `lset L 1 C` and `lappend L C` correctly store the canonical name `::C`. In v13, they still stored `C`. As for `lappend L 5`, it stores `::5`—exactly like the construct `(set {list.var.int}L 5)`—because `5` is a valid Tcl variable name. Both approaches therefore behave in the same way. An empty name is rejected in both cases. Documentation (French version, § 5.3, following the example of the variable link) This paragraph follows the rule established on October 19, which aligns with standard Tcl principles: tcl set r [lindex $L 0] ;# ::A (type var<int>) set $r ;# 7 set {var.int}R A ;# ::A ; set $R returns 7 set L(0) 8 ;# writes 8 into ::A A standalone link—when removed from its container—resolves to the variable's canonical name, and `set` returns its value. When accessed via a path within a container, reading follows the link. Writing via a path updates the target variable, subject to the enforcement of its defined contract. Any write operation involving a link results in the storage of the canonical name. Identified limitation A link to a local procedure variable has a canonical name specific to its execution frame (e.g., `frame:1:x`). While `$M(0)` correctly follows this link, `set [lindex $M 0]` fails (with the error "can't read 'frame:1:x'"), because this is not a name recognized by Tcl. I have described the limitation in the documentation and added an "item to be decided" to the roadmap, with three options: allow the variable lookup mechanism to recognize this name, as long as the scope exists; make a name usable within the current scope; stick to what is stated in the documentation. I have also added the test `t62_liens_ecriture` and a note in `noyau/LISEZMOI.md`. There are no code changes, so nothing needs to be recompiled; `typeparse.zip` is up to date. (user: Florentis, size: 795) [annotate] [blame] [check-ins using]
construction 0 ::A ::B lset L 1 C 0 ::A ::C lappend L C 0 ::A ::C ::C lappend L 5 0 ::A ::C ::C ::5 lappend L {} 1 expected a variable name but got an empty string set L(0) C 1 expected integer but got "C" lset L 0 {a b} 0 {::a b} ::C ::C ::5 lecture $L(1) 0 3 dans une procédure (locaux absents) 0 frame:1:B frame:1:C lappend L ns::D 0 {::a b} ::C ::C ::5 ::ns::D L(0)=7 r=::A type=var<int> set r=7 R=::A set $R=7 type=var<int> lset: ::A ::C L(1)=3 écriture par le lien: A=8 frame:2:x 5 1 {can't read "frame:2:x": no such variable}