Debian Codegraph @

js/src/tests/test262/language/statements/try/12.14-12.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-12
6 description: catch introduces scope - name lookup finds property
7 ---*/
8
9 function f(o) {
10
11 function innerf(o) {
12 try {
13 throw o;
14 }
15 catch (e) {
16 return e.x;
17 }
18 }
19
20 return innerf(o);
21 }
22
23 assert.sameValue(f({x:42}), 42);
24
25 reportCompare(0, 0);