fix corner case in hoist_props (#3872)

fixes #3871
This commit is contained in:
Alex Lam S.L
2020-05-10 15:23:09 +01:00
committed by GitHub
parent f9806b43c3
commit 63adfb1590
3 changed files with 39 additions and 2 deletions

View File

@@ -940,3 +940,35 @@ issue_3868: {
}
expect_stdout: "PASS"
}
issue_3871: {
options = {
hoist_props: true,
reduce_vars: true,
}
input: {
console.log(function() {
do {
var b = {
get null() {
c;
}
};
} while (!b);
return "PASS";
}());
}
expect: {
console.log(function() {
do {
var b = {
get null() {
c;
}
};
} while (!b);
return "PASS";
}());
}
expect_stdout: "PASS"
}