blob: 52b56c8bb5ec2fb6682d2c5fb768d1427ebc7cac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
class Foo {};
let x = 1;
const y = 2;
var z = 3;
var obj = globalLexicals();
assertEq(Object.keys(obj).length >= 3, true);
assertEq(obj.Foo, Foo);
assertEq(obj.x, 1);
assertEq(obj.y, 2);
assertEq("z" in obj, false);
assertEq("uninit" in obj, false);
let uninit;
// It's just a copy.
obj.x = 2;
assertEq(x, 1);
|