flightaware/Tcl-bounties

TCL BUG... matching curly parentheses when code is commented out and reporting fail error in code.

Closed this issue · 3 comments

I just found a bug in the TCL interpreter... When you have an unbalanced parantheses in commented out code ... it still reports it as an error. Example:

PS C:\bb\fpga\top\run> wsl

$ tclsh tmp.tcl
wrong # args: should be "proc name args body"
    while executing
"proc dfsdf {args} {
#       # Instantiate + Generate all + Synthesize Core
#       if ($level == 3} {
#               return
#   }"
    (file "tmp.tcl" line 1)
$

Notice that I used the wrong parenthesis for beginning "if statement" using "(" instead of "{"... however, when I source this tcl code, it reports an error even when the code that causes the erroris commented out...

tmp.txt

Firstly. this is not a BUG but feature. This is how tcl-parsing (JIT interpolation or substitution) works.
Read the documentation Summary of Tcl language syntax or a wiki page
Why can I not place unmatched braces in Tcl comments.

And last but not least, this is basically a wrong repository for issues like that (this repository is quasi a bounties collection of Flightaware for the Tcl language).
Bugs for Tcl must be opened as ticket in Tcl-Repository.

Thus it can be closed.

In addition to Sergey's comments, the Bug Bounty program is on hold due to the world situation.

Check out the Tcl mailing lists at https://www.tcl-lang.org/