12.10-0-7.js (441B)
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 es5id: 12.10-0-7 6 description: with introduces scope - scope removed when exiting with statement 7 flags: [noStrict] 8 ---*/ 9 10 var o = {foo: 1}; 11 12 with (o) { 13 foo = 42; 14 } 15 16 try { 17 foo; 18 throw new Error(); 19 } 20 catch (e) { 21 assert(e instanceof ReferenceError); 22 } 23 24 reportCompare(0, 0);