[JSC] Do not use asArrayModes() with Structures because it discards TypedArray inform...
[WebKit-https.git] / JSTests / stress / global-const-redeclaration-setting-2.js
1 var setGlobalConstRedeclarationShouldNotThrow = $vm.setGlobalConstRedeclarationShouldNotThrow;
2
3 function assert(b) {
4     if (!b)
5         throw new Error("Bad assertion.");
6 }
7
8 setGlobalConstRedeclarationShouldNotThrow(); // Allow duplicate const declarations at the global level.
9
10 for (let i = 0; i < 100; i++) {
11     load("./global-const-redeclaration-setting/first.js");
12     assert(foo === 20);
13     load("./global-const-redeclaration-setting/second.js");
14     assert(foo === 40);
15 }