TclWordKnownAtCompileTime copies word, not value
Closed / Fixed986195ffffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-07-06 20:14:28
test cmdMZ-return-2.15 {return opton handling} -setup {
proc p {} {
return -code error -errorcode {a b} c
}
} -body {
list [catch p result] $result $::errorCode
} -cleanup {
rename p {}
} -result {1 c {a b}}
gives an extra pair of braces around the error code.
On the other hand,
test cmdMZ-return-2.16 {return opton handling} -setup {
proc p {} {
return -code error -errorcode [list a b] c
}
} -body {
list [catch p result] $result $::errorCode
} -cleanup {
rename p {}
} -result {1 c {a b}}
gives the expected result
dgpplain2004-07-07 03:40:07
Logged In: YES user_id=80530 This is a flaw in TclWorkKnownAtCompileTime().
dgp Ticket [986195ffff]: 1 change
[History diff]2004-07-07 03:40:59
dgpplain2004-07-07 04:07:44
Logged In: YES
user_id=80530
For a TCL_TOKEN_SIMPLE_WORD,
the entire word (with {}) was copied,
instead of the value.
The other branch that covered
backslash quoting was also buggy.
Fixes committed.
Log in (anonymous is fine) to add a comment.