fix corner case in hoist_props (#3947)

fixes #3945
This commit is contained in:
Alex Lam S.L
2020-06-02 16:51:06 +01:00
committed by GitHub
parent c97ad98f92
commit e2e4b7fb37
2 changed files with 26 additions and 0 deletions

View File

@@ -972,3 +972,26 @@ issue_3871: {
}
expect_stdout: "PASS"
}
issue_3945: {
options = {
hoist_props: true,
reduce_vars: true,
}
input: {
function f() {
o.p;
var o = {
q: 0,
};
}
}
expect: {
function f() {
o.p;
var o = {
q: 0,
};
}
}
}