12.14-8.js (808B)
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-8 14 description: > 15 catch introduces scope - scope removed when exiting catch block 16 (properties) 17 ---*/ 18 19 var o = {foo: 42}; 20 21 try { 22 throw o; 23 } 24 catch (e) { 25 var foo = 1; 26 } 27 28 assert.sameValue(o.foo, 42); 29 30 reportCompare(0, 0);