var-env-var-non-strict.js (456B)
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: 10.4.2-2-c-1 6 description: > 7 Direct val code in non-strict mode - can instantiate variable in 8 calling context 9 flags: [noStrict] 10 ---*/ 11 12 function testcase() { 13 var x = 0; 14 function inner() { 15 eval("var x = 1"); 16 assert.sameValue(x, 1, "x"); 17 } 18 inner(); 19 } 20 testcase(); 21 22 reportCompare(0, 0);