blob: 575615c176279d97396bd2fc0100a9484dd47c4e [file] [log] [blame]
function throwSomething() {
throw "something";
}
try {
// Use eval to force BINDNAME. Should throw "something" instead of the TDZ
// ReferenceError.
eval("x = throwSomething()");
let x;
} catch (e) {
assertEq(e, "something");
}
try {
eval("x = 42");
let x;
} catch (e) {
assertEq(e instanceof ReferenceError, true);
}