Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9ccf91e72cb54c820b6a9261b03824bd0e3effcf
Ticket: 47ac84309bab4719c58a693f5d63d837887f3b17
more (compiled) lreplace madness
User & Date: aspect on 2015-06-22 03:24:10
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    in chasing [44fd4b9a4e], another edge case with compiled lreplace:
    
    <pre>% lreplace {a b c} end 0
    !! {a b c} != {a b b c}
    % lreplace {a b c} end 0 A
    !! {a b A c} != {a b A b c}</pre>
    
    
    In each case the LHS is the interpreted & incorrect answer, RHS compiled & correct.
    
    Test script:
    
    <pre>proc check {cmd} {
        puts "% $cmd"
        proc t {} $cmd
        set rc [t]
        set ri [uplevel 1 $cmd]
        if {$ri ne $rc} {
            puts "!! [list $ri != $rc]"
        } else {
            puts "ok [list $rc]"
        }
    }
    
    foreach {a} {
        0 1 2 3 end-3 end-2 end-1 end
    } {
        check [list lreplace {a b c} end $a]
        check [list lreplace {a b c} end $a a]
    }</pre>
    
  5. foundin changed to: "trunk"
  6. is_private changed to: "0"
  7. login: "aspect"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "aspect"
  13. subsystem changed to: "14. List Object"
  14. title changed to: "more (compiled) lreplace madness"
  15. type changed to: "Bug"