S13.2.2_A19_T6.js (911B)
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_T6 7 description: > 8 Function is declared in the "object->do-while" scope, then the 9 object is deleted and another object with the same name is declared 10 flags: [noStrict] 11 ---*/ 12 13 var a = 1; 14 15 var __obj = {a:2}; 16 17 with (__obj) 18 { 19 do { 20 var __func = function() 21 { 22 return a; 23 } 24 } while(0); 25 } 26 27 delete __obj; 28 29 var __obj = {a:3}; 30 31 with (__obj) 32 { 33 result = __func(); 34 } 35 36 ////////////////////////////////////////////////////////////////////////////// 37 //CHECK#1 38 if (result !== 2) { 39 throw new Test262Error('#1: result === 2. Actual: result ==='+result); 40 } 41 // 42 ////////////////////////////////////////////////////////////////////////////// 43 44 reportCompare(0, 0);