S13.2.2_A19_T3.js (794B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: Function's scope chain is started when it is declared 6 es5id: 13.2.2_A19_T3 7 description: > 8 Function is declared in the object scope and then an exception is 9 thrown 10 flags: [noStrict] 11 ---*/ 12 13 var a = 1; 14 15 var __obj = {a:2}; 16 17 try { 18 with (__obj) 19 { 20 var __func = function (){return a;}; 21 throw 3; 22 } 23 } catch (e) { 24 ; 25 } 26 27 result = __func(); 28 29 ////////////////////////////////////////////////////////////////////////////// 30 //CHECK#1 31 if (result !== 2) { 32 throw new Test262Error('#1: result === 2. Actual: result ==='+result); 33 } 34 // 35 ////////////////////////////////////////////////////////////////////////////// 36 37 reportCompare(0, 0);