var-env-func-strict-caller-strict.js (499B)
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-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 fun(x){ return x }"); 15 assert.sameValue(typeof (fun), "undefined"); 16 } 17 testcase(); 18 19 reportCompare(0, 0);