#2325 compile-3.5 improper test

obsolete: 8.4.2
closed-fixed
miguel sofer
5
2003-05-09
2003-05-09
Don Porter
No

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.

Discussion

  • miguel sofer
    miguel sofer
    2003-05-09

    Logged In: YES
    user_id=148712

    The reference is [Bug 705406], typo in the report.

     
  • miguel sofer
    miguel sofer
    2003-05-09

    Logged In: YES
    user_id=148712

    Doh, thanks for catching that! Solution committed.

     
  • miguel sofer
    miguel sofer
    2003-05-09

    • status: open --> closed-fixed