Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-05-09
20:44 • Closed ticket [735055ffff]: compile-3.5 improper test plus 7 other changes artifact: 5138dae511 user: msofer
20:20 • Ticket [735055ffff]: 4 changes artifact: 941efeead4 user: msofer
06:40 • New ticket [735055ffff]. artifact: e348ca4e95 user: dgp

compile-3.5 improper test

Closed / Fixed735055ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2003-05-09 06:40:53
Test compile-3.5 was added to check that
Bug 705496 was fixed.  Indeed the panic
reported there no longer happens.

But look at the test:

test compile-3.5 {...} {
    proc foo {} {
        catch {
            if {[a]} {
                if b {}
            }
        }
    }
    list [catch foo msg] $msg
} {1 {invalid command name "a"}}

Shouldn't the correct result be {0 1} and
not {1 {invalid command name "a"}} ?

Since the test currently passes, it seems
that in fact [foo] is not producing the
correct result.

I believe that saving/restoring 
envPtr->codeNext in addition to
envPtr->numCommands (done to
fix Bug 705496) will make the test
fail, but make the code do the
correct thing.
msoferplain2003-05-09 20:20:34
Logged In: YES 
user_id=148712

The reference is [Bug 705406], typo in the report.
msoferplain2003-05-09 20:44:04
Logged In: YES 
user_id=148712

Doh, thanks for catching that! Solution committed.
Log in (anonymous is fine) to add a comment.