Debian Codegraph @

js/src/tests/test262/language/eval-code/indirect/var-env-var-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-c-1
6 description: Indirect eval code cannot instantiate variable in calling context
7 ---*/
8
9 (function() {
10 var x = 0;
11 (0,eval)("var x = 1;");
12 assert.sameValue(x, 0, "x");
13 }());
14
15 assert.sameValue(x, 1);
16
17 reportCompare(0, 0);