-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Immediately invoked async functions lead to non-working code #5754
Comments
@fhammerschmidt here's a simpler instance: let willBeInlined = async () => 3
let q = willBeInlined () gives async function willBeInlined(param) {
return 3;
}
var q = 3; Would you say this should be avoided? |
I think your example is fine, as it still executes. But mine yields:
|
cristianoc
added a commit
that referenced
this issue
Oct 25, 2022
Both are actually problematic, as async behaviour is removed from what could be long-running computations. |
cristianoc
added a commit
that referenced
this issue
Oct 26, 2022
* Prevent inlining of async functions Fixes #5754 * Update CHANGELOG.md * Refactor logic to disable inlining of async functions. * Prevent all async function beta reductions.
Will be fixed in the next 10.1 release. |
57 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider this example:
this works and creates the following JS
but when I immediately invoke the async function and make it anonymous
it compiles to
which misses the async keyword somewhere.
The text was updated successfully, but these errors were encountered: