haikuwebkit/LayoutTests/js/script-tests/try-try-return-finally-fina...

26 lines
490 B
JavaScript

description(
"Tests what would happen if you have nested try-finally's with interesting control statements nested within them. The correct outcome is for this test to not crash during bytecompilation."
);
function foo() {
try{
while(a){
try{
if(b){return}
}finally{
c();
}
if(d){return}
}
}finally{
e();
}
}
try {
foo();
} catch (e) {
testPassed("It worked.");
}