Artifacts Associated With Ticket 2486824
Ticket change [cc6bb7bef4] (rid 95694) by stwo on 2009-01-05 01:42:54:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% namespace eval n { proc p {} { global a(b) }; p } bad variable name "a(b)": upvar won't create a scalar variable that looks like an array element - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "stwo"
- subsystem initialized to: "07. Variables"
- title initialized to: ""upvar" in [global]'s err msg."
- type initialized to: "Bug"
Ticket change [bd9275e290] (rid 101927) by dkf on 2009-01-05 16:25:09:
- foundin changed to: "obsolete: 8.6b1"
- icomment:
I suggest just getting rid of the word "upvar" from that message.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
Ticket change [23be3e033f] (rid 130988) by ferrieux on 2009-01-05 16:30:16:
- icomment:
Agreed, since the overall style of error messages is to omit the command name, and being smart about it involves an ugly switch on the flags parameter in the common code. For consistency we might do the same to 'upvar won't create namespace variable that refers to procedure variable' even though, by accident, this message occurs in more constrained contexts. Don't forget the three tests to update accordingly :-)
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [87872e5286] (rid 131711) by dgp on 2009-04-03 02:38:05:
- icomment:
Another reason it's generally a bad idea to include a command name in an error message is that Tcl commands can be [rename]d. Let the error message describe the error only; leave it to -errorinfo to describe the context.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3c26566039] (rid 120871) by dgp on 2009-04-09 22:33:41:
- icomment:
Note also this apparent inconsistency: % proc demo {} {global a(k)} % demo bad variable name "a(k)": upvar won't create a scalar variable that looks like an array element % global a(k) % I would think that varNames that look like array elements ought to be always forbidden as arguments to [global]. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [32e51254d4] (rid 93696) by msofer on 2009-05-01 08:30:09:
- priority changed to: "6"
Ticket change [85e25bbf52] (rid 131399) by stwo on 2012-07-17 01:12:47:
- icomment:
Are we going anywhere with this?
- login: "stwo"
- mimetype: "text/plain"
- username: "stwo"
- icomment:
Add attachment "tv.diff" [ef265a5e38] (rid 139802) by stwo on 2014-09-09 22:48:37.
Ticket change [d07aa4074b] (rid 139804) by dkf on 2014-09-10 05:35:15:
- closer changed to: "nobody"
- comment changed to:
% namespace eval n { proc p {} { global a(b) }; p } bad variable name "a(b)": upvar won't create a scalar variable that looks like an array element - icomment: "Looks like the right sort of thing."
- login: "dkf"
- mimetype: "text/html"
- priority changed to: "9 Immediate"
- severity changed to: "Minor"
- username: "dkf"
Ticket change [21c66067a3] (rid 139805) by aku on 2014-09-10 06:11:41:
- icomment:
Agreed. I sort of remember that this was ok in some past version, possibly in the 8.4 cycle, and then was changed to this error. Because a scalar looking like an array element was simply all sorts of pain. I vote for getting rid of the word "upvar" from the generated message.
- login: "aku"
- mimetype: "text/plain"
- icomment:
Ticket change [5d26d6c4d7] (rid 139817) by dkf on 2014-09-10 08:25:40:
- closedate changed to: "2456910.85116674"
- closer changed to: "dkf"
- icomment: "Sorted on 8.5 and 8.6 branches"
- login: "dkf"
- mimetype: "text/html"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"