Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: dd5c5dd9c3b893460869f6b8032ea6a043f991254a6765773dcbe49756411301
Ticket: 9889f96f4da77e3b80dfa7ec6aa99b65c17974d1
Regression when mixing eval + clock + error within condition block
User & Date: sebres on 2024-05-13 12:33:36
Changes

  1. icomment:
    The reason for origin issue is not directly compile ensemble, but an increment of compile-epoch and following [switch to direct eval](./file?ci=core-8-branch&name=generic/tclExecute.c&ln=8043-8069).
    So after this, tcl starts to evaluate `if 1 { ...` from scratch without to consider that this is a continuation of script (line 3) for whatever reason.
    
    Here is a test case illustrating the same behaviour:
    ```
    set c [subst -nocommands -novariables {puts ===[incr ::cntr]===; if {$::cntr == 1} {puts **BUMP**; testbumpinterpepoch};\n\nif 1 {\nputs \[info frame 0\]\n}}]; puts $c; time $c 2
    ```
    The result:
    ```
    ===1===
    **BUMP**
    type eval line 2 cmd {info frame 0} level 0
    ===2===
    type eval line 4 cmd {info frame 0} level 0
    ```
    How one can see epoch bump causes a reset of the line-number.
    
    And 8.6 is affected in the same way.
    
  2. login: "sebres"
  3. mimetype: "text/x-markdown"