workaround bug in ECMAScript specification (#4656)

closes #4655
This commit is contained in:
Alex Lam S.L
2021-02-16 15:39:06 +00:00
committed by GitHub
parent fa8aa204a0
commit 6a2bda52f3
2 changed files with 34 additions and 5 deletions

View File

@@ -5409,3 +5409,30 @@ issue_4612_4: {
}
expect_stdout: "undefined"
}
issue_4655: {
options = {
functions: true,
loops: true,
reduce_vars: true,
side_effects: true,
unused: true,
}
input: {
(function f() {
while (console.log("PASS")) {
var g = function() {};
for (var a in g)
g();
}
})();
}
expect: {
(function() {
for (; console.log("PASS");) {
function g() {};
}
})();
}
expect_stdout: "PASS"
}