var-env-func-strict-caller-2-strict.js (512B)
1 'use strict'; 2 // Copyright (c) 2012 Ecma International. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 es5id: 10.4.2.1-2-s 7 description: > 8 Strict Mode - Strict mode eval code cannot instantiate functions 9 in the variable environment of the caller to eval 10 flags: [onlyStrict] 11 ---*/ 12 13 function testcase() { 14 eval("function _10_4_2_1_2_fun(){}"); 15 assert.sameValue(typeof _10_4_2_1_2_fun, "undefined"); 16 } 17 testcase(); 18 19 reportCompare(0, 0);