Bug 1285710 - Add testcase for error message for redeclaration error. r=shu

This commit is contained in:
Tooru Fujisawa 2016-11-15 13:00:50 +09:00
parent 7f263d232a
commit 6db3eda41a

View File

@ -0,0 +1,10 @@
var aVar = 56;
try {
console.log(aLet);
let aLet = 56;
// We cannot add `caught` variable on the toplevel for this testcase.
// We use assertEq here to catch non-throwing case.
assertEq(true, false);
} catch (e) {
assertEq(e.message, "can't access lexical declaration `aLet' before initialization");
}