Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cfa50e09704bd91becbe2a7953d7af1f5340b0e3
Ticket: bb6108bb671bb697f10466325e4e9c612831b544
Array tracing not as documented
User & Date: aspect on 2015-10-05 00:07:02
Changes

  1. icomment:
    <p>I've attached a file with a failing tcltest script (and a near variation which passes).</p>
    
    <p>The issues seem to hit when trace1 creates an array element that did not previously exist:</p>
    
    <pre>
    ---- Output was:
    In trace1 {y foo read}: 1
    End trace1
    In trace2 {y foo read}: 1
    In trace1 {y bar read}: 1
    End trace1
    In trace2 {y bar read}: 1
    foo 1 bar 2
    End trace2
    foo 1 bar 2
    End trace2
    y = foo 1
    
    ---- Output should have been (exact matching):
    In trace1 {y foo read}: 1
    End trace1
    In trace2 {y foo read}: 2
    foo 2
    End trace2
    y = foo 1 bar 2
    </pre>
    
    <p>I'm not sure if the recursive triggering should happen when the y(foo) handler modifies y(bar), but the change remaining invisible to the main program is clearly a bug.</p>
    
    <p>See also what happens with `set y(bar) 3` inserted before creating the traces.</p>
    
  2. login: "aspect"
  3. mimetype: "text/html"
  4. username: "aspect"