Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 84f419cfcc71d6942afa6a86ef1ac5915c27ddfe
Ticket: 2889293fffffffffffffffffffffffffffffffff
[info exists array(elem)] deletes array searches
User & Date: mistachkin on 2009-10-30 07:55:47
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    It seems the act of checking for an array element has the effect of deleting pending array searches.
    Why does INST_EXIST_STK in TEBC call TclObjLookupVarEx with createPart2 non-zero?
    
    Example:
    
    set s [array startsearch tcl_platform]
    
    #
    # NOTE: Try this test with and without this [puts] line commented.
    #
    puts stdout [info exists tcl_platform([clock seconds])]; # improperly invalidates array search.
    
    set result [list]
    while {[array anymore tcl_platform $s]} {
      if {[array nextelement tcl_platform $s] eq "user"} then {
        lappend result user
      }
    }
    
    set result; # should be "user"
    catch {array donesearch tcl_platform $s}
    catch {unset -nocomplain result s}
    
  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: "mistachkin"
  10. subsystem changed to: "47. Bytecode Compiler"
  11. title changed to: "[info exists array(elem)] deletes array searches"
  12. type changed to: "Bug"