fix corner case in inline (#5532)

fixes #5531
This commit is contained in:
Alex Lam S.L
2022-06-29 21:09:53 +01:00
committed by GitHub
parent e1b03d0235
commit 2426657daa
2 changed files with 113 additions and 1 deletions

View File

@@ -10784,7 +10784,9 @@ Compressor.prototype.compress = function(node) {
});
child = scope;
scope = compressor.parent(level++);
if (scope instanceof AST_DWLoop) {
if (scope instanceof AST_ClassField) {
if (!scope.static) return false;
} else if (scope instanceof AST_DWLoop) {
in_loop = [];
} else if (scope instanceof AST_For) {
if (scope.init === child) continue;