[JSC] AI should not propagate AbstractValue relying on constant folding phase
[WebKit-https.git] / JSTests / stress / global-environment-does-not-trap-unscopables.js
1 function test(actual, expected) {
2     if (actual !== expected)
3         throw new Error('bad value: ' + actual);
4 }
5
6 var global = new Function('return this')();
7 var Cocoa = 'Cocoa';
8
9 global[Symbol.unscopables] = {
10     Cocoa: true
11 };
12
13 test(Cocoa, "Cocoa");
14 (function () {
15     var Cocoa = 'local'
16     with (global) {
17         test(Cocoa, "local");
18     }
19 }());