enhance booleans (#3657)

This commit is contained in:
Alex Lam S.L
2019-12-30 22:41:11 +08:00
committed by GitHub
parent 78c8efd851
commit 4dbdac9c31
4 changed files with 78 additions and 27 deletions

View File

@@ -86,3 +86,27 @@ issue_3465_3: {
}
expect_stdout: "PASS"
}
issue_2737_2: {
options = {
booleans: true,
inline: true,
reduce_vars: true,
unused: true,
}
input: {
(function(bar) {
for (;bar();) break;
})(function qux() {
return console.log("PASS"), qux;
});
}
expect: {
(function(bar) {
for (;bar();) break;
})(function() {
return console.log("PASS"), 1;
});
}
expect_stdout: "PASS"
}