blob: 854c79e3e09adcf90f7e4991c1a3073c85d141fb [file] [log] [blame]
function assert(cond) {
if (!cond)
throw new Error("broke assertion");
}
noInline(assert);
function shouldThrowTDZ(func) {
var hasThrown = false;
try {
func();
} catch(e) {
if (e.name.indexOf("ReferenceError") !== -1)
hasThrown = true;
}
assert(hasThrown);
}
noInline(shouldThrowTDZ);
let b = false;
function foo() {
if (b) {
x = x;
return x;
}
}
foo(); // Link as UnresolvedProperty.