Overview
| Artifact ID: | 11ef0939104cd9554f1c46c05b210710cc461e85 |
|---|---|
| Ticket: | ace7bf3dcff30d649961bcabd4caea48a1ac0b49
trace on upvar'd arrays appears inconsistent |
| User & Date: | cmcc on 2014-05-25 21:52:17 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Per the code below, I would have expected the upvar'd element modification to trigger the array trace as well as the element trace. I accept that this may be a lot of work and complexity for what is a corner case. I suggest that the documentation specify the behaviour in this case. variable V; array set V {} proc eincr {} { upvar #0 V(a) a incr a } proc aincr {} { upvar #0 V V incr V(a) } proc varmod {args} { puts stderr "varmod: $args" } ::trace add variable V(a) {write unset} [list varmod element] ::trace add variable V {write unset} [list varmod array] puts stderr "global set" set V(a) 1 ;# triggers array and element traces puts stderr "upvar array element set" aincr ;# triggers array and element traces puts stderr "upvar element set" eincr ;# triggers only element trace - foundin changed to: "8.6"
- is_private changed to: "0"
- login: "cmcc"
- priority changed to: "5 Medium"
- private_contact changed to: "16910d69b11045755316a073070779a85cd9218f"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "cmcc"
- subsystem changed to: "46. Traces"
- title changed to: "trace on upvar'd arrays appears inconsistent"
- type changed to: "Patch"