Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e487a64ff7b3affd5bdcb205a419feafe4ab4c42
Ticket: 3019348fffffffffffffffffffffffffffffffff
Nested lset can modify list on error
User & Date: andygoth on 2010-06-22 01:32:21
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    My expectation is that when lset throws an error, it won't modify the list.  However, the following script shows otherwise:
    
    % set foo {}
    % lset foo 0 0 x
    x
    % lset foo 0 1 x
    {x x}
    % lset foo 1 0 x
    {x x} x
    % lset foo 1 1 x
    {x x} {x x}
    % lset foo 2 1 x
    list index out of range
    % set foo
    {x x} {x x} {}
    % lset foo 3 0 x
    {x x} {x x} {} x
    % lset foo 3 1 x
    {x x} {x x} {} {x x}
    
    The command [lset foo 2 1 x] throws an error but also adds an empty element to the end of the list.
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "andygoth"
  10. subsystem changed to: "17. Commands I-L"
  11. title changed to: "Nested lset can modify list on error"
  12. type changed to: "Bug"