Artifacts Associated With Ticket 1333036
Ticket change [bd0a065aa8] (rid 101844) by msofer on 2005-10-20 10:05:31:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
(Bug reported on clt by neuronstorm at gmail dot com) mig@ave:/home/CVS/tcl_SF_clean/unix$ cat /tmp/test set a [list {1 b} {c d}] set b $a lset b 0 0 2 ;#change one subelement in the new list puts "{$a}:{$b}:[expr {$b == $a}]" mig@ave:/home/CVS/tcl_SF_clean/unix$ ./tclsh /tmp/test {{2 b} {c d}}:{{2 b} {c d}}:1 Notes: 1. The bug does not show at the console, nor within a proc body 2. The bug does not show if the first line is replaced by set a {{1 b} {c d}} but it still appears when it is set a [list [list 1 b] [list c d]] - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "17. Commands I-L"
- title initialized to: "lset misshandles sublists"
- type initialized to: "Bug"
Ticket change [ab305f03d6] (rid 101058) by msofer on 2005-10-20 18:00:23:
- icomment:
Logged In: YES user_id=148712 (Thanks dkf) This duplicates the bug within a proc body by avoiding a literal that shares the first sublist. proc bar {} { set a [list [list 1 b] [list c d]] set b $a lset b 0 0 2 ;#change one subelement in the new list puts stdout "a $a" puts stdout "b $b" };bar The problem is in the usage of the new List intrep that can be shared: duplicating the List does not cause the elements to be shared, the handling has not been done correctly in TclLsetFlat. - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [2b9aa891ca] (rid 118768) by msofer on 2005-10-20 19:22:34:
- closedate changed to: "2005-10-20T12:22:34"
- closer changed to: "msofer"
- resolution changed to: "Fixed"
- status changed to: "Closed"