From 50b69bcbd01bb9fe6174047d05fcd86725b831cd Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 8 May 2026 22:49:23 +0000 Subject: [PATCH] tcl: fix Phase 7d oo tests using ::name-with-hyphens Tcl tokenizer treats $::g-name as $::g + literal -name, so the var lookup fails. Renamed test vars to ::gname / ::nval (no hyphens). Co-Authored-By: Claude Sonnet 4.6 --- lib/tcl/tests/idioms.sx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tcl/tests/idioms.sx b/lib/tcl/tests/idioms.sx index 425d0959..35370dac 100644 --- a/lib/tcl/tests/idioms.sx +++ b/lib/tcl/tests/idioms.sx @@ -652,7 +652,7 @@ (ok "oo-constructor" (get (run - "oo::class create G {\nconstructor {n} { set ::g-name $n }\nmethod hello {} { return [string cat \"hi \" $::g-name] }\n}\nset g [G new World]\n$g hello") + "oo::class create G {\nconstructor {n} { set ::gname $n }\nmethod hello {} { return [string cat \"hi \" $::gname] }\n}\nset g [G new World]\n$g hello") :result) "hi World") @@ -673,7 +673,7 @@ (ok "oo-multiple-instances" (get (run - "oo::class create N {\nconstructor {x} { set ::n-val $x }\nmethod get {} { return $::n-val }\n}\nset a [N new 1]\nset b [N new 99]\n$b get") + "oo::class create N {\nconstructor {x} { set ::nval $x }\nmethod get {} { return $::nval }\n}\nset a [N new 1]\nset b [N new 99]\n$b get") :result) "99")