fix corner case in inline (#4266)

fixes #4265
This commit is contained in:
Alex Lam S.L
2020-11-08 10:50:08 +00:00
committed by GitHub
parent 1cbd07e789
commit 810cd40356
2 changed files with 36 additions and 3 deletions

View File

@@ -5183,3 +5183,34 @@ issue_4261: {
}
expect_stdout: true
}
issue_4265: {
options = {
conditionals: true,
dead_code: true,
inline: true,
sequences: true,
}
input: {
function f() {
console;
if ([ function() {
return this + console.log(a);
a;
var a;
}() ]);
return 0;
}
f();
}
expect: {
function f() {
return console, function() {
return console.log(a);
var a;
}(), 0;
}
f();
}
expect_stdout: "undefined"
}