fix corner case in inline (#5577)

fixes #5576
This commit is contained in:
Alex Lam S.L
2022-07-26 03:46:54 +01:00
committed by GitHub
parent 996836b67e
commit da930affd2
2 changed files with 36 additions and 1 deletions

View File

@@ -3828,7 +3828,8 @@ Compressor.prototype.compress = function(node) {
var changed = false;
var index = statements.length - 1;
if (in_lambda && index >= 0) {
var inlined = statements[index].try_inline(compressor, block_scope);
var no_return = in_try && in_try.bfinally && in_async_generator(scope);
var inlined = statements[index].try_inline(compressor, block_scope, no_return);
if (inlined) {
statements[index--] = inlined;
changed = true;