blob: aed1b41c4aa368eaa90d26d95cc3a43ec3ccd0e2 [file] [log] [blame]
var setGlobalConstRedeclarationShouldNotThrow = $vm.setGlobalConstRedeclarationShouldNotThrow;
function assert(b) {
if (!b)
throw new Error("Bad assertion.");
}
setGlobalConstRedeclarationShouldNotThrow(); // Allow duplicate const declarations at the global level.
load("./global-const-redeclaration-setting/first.js");
assert(foo === 20);
load("./global-const-redeclaration-setting/second.js");
assert(foo === 40);