You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return obj; inside a while in ES5-transpiled generators are not being transpiled to return [2, obj];, potentially causing infinite loops. As async functions are transpiled using generators, this also affects async functions.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
return obj;
inside a while in ES5-transpiled generators are not being transpiled toreturn [2, obj];
, potentially causing infinite loops. Asasync
functions are transpiled using generators, this also affects async functions.(Thank you oka@chromium.org for finding this bug: https://crrev.com/c/4659623)
Input code
Config
Playground link
https://play.swc.rs/?version=1.3.66&code=H4sIAAAAAAAAA0ssrsxLVkgrzUsuyczPU0gEccMzMnNSNTQVqrkUgKAcxFPQKCkqTYUJgUBRaklpUZ5Cda01WKiWq5aLC2aMlkJ6al5qUWJJfhG5ZgEALxL9bJgAAAA%3D&config=H4sIAAAAAAAAA1WPSw7DIAwF9zkF8rrbdtE79BCIOhERP9mOVBTl7oUE0maH3xszsA5KwcwGnmotxzIkTYx0ziXhHER%2FSgKSE7IhmwRuvRWu1agd4x5tRwOiaUKpW8j3hoOLkbHjLfM22DH%2FC030iZD5ClZUh8nhVTc0Jfj4XvayfaQ%2B9tA%2F4Ad12XkxWH71TaEFh%2B0LYuVI0xQBAAA%3D
Expected behavior
Both functions in the example immediately return an empty object after calling
.next()
/ awaiting.Actual behavior
Both functions in the example run infinitely.
Version
1.3.66
Additional context
No response
The text was updated successfully, but these errors were encountered: