handle variable declaration within catch blocks (#1546)

accounts for IE8- scoping
This commit is contained in:
Alex Lam S.L
2017-03-05 13:13:44 +08:00
committed by GitHub
parent b33e7f88e6
commit b70591be1a
5 changed files with 69 additions and 6 deletions

View File

@@ -605,6 +605,29 @@ inner_var_for_in_2: {
}
}
inner_var_catch: {
options = {
evaluate: true,
reduce_vars: true,
}
input: {
try {
a();
} catch (e) {
var b = 1;
}
console.log(b);
}
expect: {
try {
a();
} catch (e) {
var b = 1;
}
console.log(b);
}
}
issue_1533_1: {
options = {
collapse_vars: true,