Debian Codegraph @

js/src/tests/test262/language/statements/try/12.14-10.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 12.14-10
6 description: catch introduces scope - name lookup finds function parameter
7 ---*/
8
9 function f(o) {
10
11 function innerf(o, x) {
12 try {
13 throw o;
14 }
15 catch (e) {
16 return x;
17 }
18 }
19
20 return innerf(o, 42);
21 }
22
23 assert.sameValue(f({}), 42);
24
25 reportCompare(0, 0);