Tcl Source Code

View Ticket
Login
Ticket UUID: b198d6560a6174dcec95bde749cf450d1052d406
Title: 3-argument switch doesn't get bytecompiled
Type: Bug Created on: 2013-07-18 17:22:56
Submitter: anonymous Assigned to: nobody
Subsystem: 47. Bytecode Compiler Severity: Important
Priority: 5 Medium Last modified: 2013-07-18 17:22:56
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: 91ed4186a8dd4deb14dd4fb8128c78c212ca26ef
Description:
The 3-argument form of switch does not get bytecompiled, despite the suggestion in the source code  that it does. See 
http://core.tcl.tk/tcl/artifact/3805ec834a6f0d7bb27d13f893242acb82229c36?ln=1031,1033 

These result in a jump table:
::tcl::unsupported::disassemble script {switch $a  {foo - bar - baz {set a 1}}}
::tcl::unsupported::disassemble script {switch -exact -- $a  {foo - bar - baz {set a 1}}}

But this does not
::tcl::unsupported::disassemble script {switch -exact $a  {foo - bar - baz {set a 1}}}