[JSC] Do not use asArrayModes() with Structures because it discards TypedArray inform...
[WebKit-https.git] / JSTests / stress / global-const-redeclaration-setting.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 load("./global-const-redeclaration-setting/first.js");
11 assert(foo === 20);
12 load("./global-const-redeclaration-setting/second.js");
13 assert(foo === 40);