var-env-func-strict.js (557B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-performeval 5 es5id: 10.4.2.1-4-s 6 description: > 7 Strict Mode - Strict mode eval code cannot instantiate functions 8 in the variable environment of the caller to eval. 9 ---*/ 10 11 var typeofInside; 12 13 (function() { 14 (0,eval)("'use strict'; function fun(){}"); 15 typeofInside = typeof fun; 16 }()); 17 18 assert.sameValue(typeofInside, "undefined"); 19 assert.sameValue(typeof fun, "undefined"); 20 21 reportCompare(0, 0);