enhance inline (#5655)

- improve fix for #5653
This commit is contained in:
Alex Lam S.L
2022-09-08 21:07:47 +01:00
committed by GitHub
parent 02d966d914
commit 9dec612cd5
2 changed files with 30 additions and 12 deletions

View File

@@ -668,6 +668,28 @@ single_use_recursive: {
node_version: ">=4"
}
inline_iife_within_arrow: {
options = {
arrows: true,
inline: true,
}
input: {
var f = () => console.log(function(a) {
return Math.ceil(a);
}(Math.random()));
f();
}
expect: {
var f = () => {
return console.log((a = Math.random(), Math.ceil(a)));
var a;
};
f();
}
expect_stdout: "1"
node_version: ">=4"
}
issue_4388: {
options = {
inline: true,