Closed
Bug 226517
Opened 21 years ago
Closed 21 years ago
Finally is executed before return expression
Categories
(Rhino Graveyard :: Compiler, defect)
Rhino Graveyard
Compiler
Tracking
(Not tracked)
VERIFIED
FIXED
1.5R5
People
(Reporter: igor, Assigned: igor)
References
Details
Currently Rhino executes finally block before evaluating return expression. For example, the following test in Rhino shell prints "FAILED" because finally code will be executed before (return_expression_was_calculated = true) is evaluated. var ok; function test() { var return_expression_was_calculated = false; try { return (return_expression_was_calculated = true); } finally { ok = return_expression_was_calculated; } } test(); print(ok ? "OK" : "FAILED")
Assignee | ||
Comment 1•21 years ago
|
||
I will fix it in the scope of bug 225831
Assignee: nboyd → igor
Depends on: 225831
Summary: Finally is executed before return expression → Finally is executed before return expression
Assignee | ||
Comment 2•21 years ago
|
||
Fxed as part of bug 225831
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 3•21 years ago
|
||
Igor's testcase added to JS testsuite: mozilla/js/tests/ecma_3/Statements/regress-226517.js
Comment 4•21 years ago
|
||
Verified FIXED. The above testcase used to fail in both the compiled and interpreted modes of Rhino. Now it passes in both -
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•