Debian Codegraph @

js/src/tests/test262/language/eval-code/indirect/var-env-func-non-strict.js

raw
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-2-s
6 description: >
7 Non-stict mode indirect eval code cannot instantiate functions in the
8 variable environment of the caller
9 ---*/
10
11 var typeofInside;
12
13 (function() {
14 (0,eval)("function fun() {}");
15 typeofInside = typeof fun;
16 }());
17
18 assert.sameValue(typeofInside, "function");
19 assert.sameValue(typeof fun, "function");
20
21 reportCompare(0, 0);