summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/try-catch-2.js
blob: 80ed6c9e9fb434efb1d7066cf9b5954977b3fad5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Control flow does not reach end of try block, code after try statement is
// reachable by catch block.
function f() {
    try {
	throw 3;
    } catch(e) {
    }

    var res = 0;
    for (var i=0; i<40; i++)
	res += 2;
    return res;
}
assertEq(f(), 80);