fix(es/minifier): Abort seq inline on recursive usage (#8887)

**Related issue:**

 - Closes #8841
This commit is contained in:
Austaras 2024-04-23 20:34:14 +08:00 committed by GitHub
parent 839bbfd78c
commit cd4548fd8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View File

@ -2308,7 +2308,7 @@ impl Optimizer<'_> {
can_take_init = true;
}
if usage.inline_prevented {
if usage.inline_prevented || usage.used_recursively {
return Ok(false);
}

View File

@ -0,0 +1,4 @@
export const k = (() => {
var x = x;
return x;
})();

View File

@ -0,0 +1,2 @@
var x;
export const k = x;