S13.2.2_A19_T2.js (700B)
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_T2 7 description: Function is declared in the object scope. Using "with" statement 8 flags: [noStrict] 9 ---*/ 10 11 var a = 1; 12 13 var __obj = {a:2}; 14 15 with (__obj) 16 { 17 result = (function(){return a;})(); 18 } 19 20 ////////////////////////////////////////////////////////////////////////////// 21 //CHECK#1 22 if (result !== 2) { 23 throw new Test262Error('#1: result === 2. Actual: result ==='+result); 24 } 25 // 26 ////////////////////////////////////////////////////////////////////////////// 27 28 reportCompare(0, 0);