enhance inline & unused (#5245)

This commit is contained in:
Alex Lam S.L
2022-01-01 21:40:43 +00:00
committed by GitHub
parent 8d0422b6f3
commit 87a7426598
17 changed files with 992 additions and 236 deletions

View File

@@ -262,6 +262,30 @@ de_morgan_2e: {
node_version: ">=14"
}
inline_binary_nullish: {
options = {
inline: true,
}
input: {
(function() {
while (console.log("foo"));
})() ?? (function() {
while (console.log("bar"));
})();
}
expect: {
if (void 0 === function() {
while (console.log("foo"));
}())
while (console.log("bar"));
}
expect_stdout: [
"foo",
"bar",
]
node_version: ">=14"
}
issue_4679: {
options = {
comparisons: true,