js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:14cd9b8ce71a
1 // Copyright 2011 Google Inc. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /**
5 * @path ch10/10.4/10.4.2/S10.4.2.1_A1.js
6 * @description Strict indirect eval should not leak top level
7 * declarations into the global scope
8 * @onlyStrict
9 */
10
11 "use strict";
12 if (!('foo' in this)) {
13 (1,eval)('"use strict"; var foo = 88;');
14 if ('foo' in this) {
15 $ERROR("Strict indirect eval leaked a top level declaration");
16 }
17 }

mercurial