Tcl Source Code

Artifact [47122325e1]
Login

Artifact 47122325e1e873cca40a87108636c4f595977781:

Attachment "lappend_bug.txt" to ticket [3057639fff] added by andreas_kupries 2010-09-02 00:41:36.
proc test {oper elem value}  {
    switch -- $oper { add { lappend ::env($elem) $value } }
}
test add key "new value"

# This is a minimal case that will cause the problem.  Note that the following code fails in both 8.4 and 8.5:

proc test {oper elem value}  {
    lappend ::env($elem) $value
}
test add key "new value"