summaryrefslogtreecommitdiff
path: root/regtest.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-11-11 16:03:40 +1000
committerSteve Bennett <steveb@workware.net.au>2011-11-18 07:59:19 +1000
commitc7f5c1516468bc44bd61e556adebbdf4e5f39e13 (patch)
treebe02e2aac6bbf9d7ce07eaba467c629698bc5a8f /regtest.tcl
parentf41fd056f21b4f39f946a914ae71994525026029 (diff)
Improvements to variable caching and resolution
Cache the correct callframe id for ::global vars Move variable creation out into JimCreateVariable() Fix some cases of upvar/global with ::global vars Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'regtest.tcl')
-rw-r--r--regtest.tcl12
1 files changed, 12 insertions, 0 deletions
diff --git a/regtest.tcl b/regtest.tcl
index de796d9..999d4b0 100644
--- a/regtest.tcl
+++ b/regtest.tcl
@@ -153,6 +153,18 @@ catch {
# Actually, the test passes if no objects leaked on exit
puts "TEST 23 PASSED"
+# REGTEST 24
+# 13 Nov 2011 - invalid cached global var
+proc a {} {
+ foreach i {1 2} {
+ incr z [set ::t]
+ unset ::t
+ }
+}
+set t 6
+catch a
+puts "TEST 24 PASSED"
+
# TAKE THE FOLLOWING puts AS LAST LINE
puts "--- ALL TESTS PASSED ---"