Overview
| Artifact ID: | 7689f6612c310028a6ad59975e48c76af35ca0f4f635bd035eb74d3631f9a565 |
|---|---|
| Ticket: | 67d5f75c36cbada6cf2361aaf49cffa61281143b
[$interp eval $lambda] after [eval $lambda] or vice versa fails |
| User & Date: | dbohdan on 2024-09-29 13:23:29 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-markdown"
- comment changed to:
The following code generates an error with a blank message in Tcl 9 but succeeds in Tcl 8.6. The error seems to only occur when: - You use a `[list]` command to create the anonymous function. It does not occur with a braced string. - The contents of the list is `apply ...` rather than, for example, `puts hi`. `[eval]` and `[$interp eval]` can be called in either order; the second one fails. ## Code ```tcl set lambda [list apply {{} { puts hi }}] puts [list [info patchlevel] {*}[array get tcl_platform]] eval $lambda set interp [interp create] $interp eval $lambda ``` This is the contents of the file `tests/all.tcl` in the log. ## Log ```none > tclsh8.6 tests/all.tcl 8.6.14 osVersion 6.8.0-44-generic pointerSize 8 byteOrder littleEndian threaded 1 machine x86_64 platform unix pathSeparator : os Linux engine Tcl user dbohdan wordSize 8 hi hi > tclsh9.0 tests/all.tcl 9.0.0 osVersion 6.8.0-44-generic pointerSize 8 byteOrder littleEndian machine x86_64 platform unix pathSeparator : os Linux engine Tcl user dbohdan wordSize 8 hi while executing "apply {{} { puts hi }}" invoked from within "$interp eval $lambda" (file "tests/all.tcl" line 11) ``` - foundin changed to: "9.0.0"
- is_private changed to: "0"
- login: "dbohdan"
- priority changed to: "5 Medium"
- private_contact changed to: "f4b679459a3c52d67a51ecd06fa3fba663ebe607"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "dbohdan"
- subsystem changed to: "20. [interp]"
- title changed to:
[$interp eval $lambda] after [eval $lambda] or vice versa fails
- type changed to: "Bug"