Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6d1dba9df54af67f2465dfff9f216939c05927b4306867393103a61ed18bc224
Ticket: 934e6eb9cf15782433ffbc2f56cecdac30c596f5
ensemble unknown handler confused by tailcall
User & Date: pooryorick on 2020-01-03 20:04:41
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    <code>tailcall</code> confuses the unknown handler of a namespace ensemble.  The following
    script,
    
    <code><verbatim>
    namespace eval ns1 {
        proc dispatch {routine args} {
            return list
        }
        namespace ensemble create -unknown [
        list ::apply [list {ensemble routine args} {
            tailcall dispatch $routine {*}$args
        } [namespace current]]]
    }
    
    puts [ns1 x one two three]
    </verbatim></code>
    
    results in the error:
    
    <verbatim>
    unknown subcommand "x": namespace ::ns1 does not export any commands
    </verbatim>
    
    However, if the word "tailcall" is removed, then the result is as expected:
    
    
    <verbatim>
    one two three
    </verbatim>
    
  5. is_private changed to: "0"
  6. login: "pooryorick"
  7. priority changed to: "5 Medium"
  8. resolution changed to: "None"
  9. severity changed to: "Minor"
  10. status changed to: "Open"
  11. submitter changed to: "pooryorick"
  12. subsystem changed to: "21. [namespace]"
  13. title changed to: "ensemble unknown handler confused by tailcall"
  14. type changed to: "Bug"