Debian Codegraph @

js/src/tests/test262/language/statements/try/12.14-6.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 info: |
6 local vars must not be visible outside with block
7 local functions must not be visible outside with block
8 local function expresssions should not be visible outside with block
9 local vars must shadow outer vars
10 local functions must shadow outer functions
11 local function expresssions must shadow outer function expressions
12 eval should use the appended object to the scope chain
13 es5id: 12.14-6
14 description: >
15 catch introduces scope - block-local function expression must
16 shadow outer function expression
17 ---*/
18
19 var o = {foo : function () { return 42;}};
20
21 try {
22 throw o;
23 }
24 catch (e) {
25 var foo = function () {};
26 }
27
28 assert.sameValue(foo(), undefined);
29
30 reportCompare(0, 0);