Overview
| Artifact ID: | e25e31d13994c5ba564faa35b87d37b549c1bd15 |
|---|---|
| Ticket: | 7f02ff1efa308825b21e58ec04cee898fe9c44ad
unset traces on local vars write in caller context |
| User & Date: | dgp on 2016-09-07 17:06:01 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
proc constant {name value} { upvar 1 $name c set c $value trace variable c wu [list reset $value] } proc reset {v a i o} { uplevel 1 [list constant $a $v] } proc demo {} { puts [info exists pi] constant pi 3.14 puts [info exists pi] } puts [info exists pi] demo puts [info exists pi] Output is: 0 0 1 1 Output should be: 0 0 1 0 The unset trace that re-creates the variable is doing so in the caller context of [demo]. This is wrong. - is_private changed to: "0"
- login: "dgp"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "07. Variables"
- title changed to: "unset traces on local vars write in caller context"
- type changed to: "Bug"