-
Notifications
You must be signed in to change notification settings - Fork 469
Another case of "async" missing in JS output #5980
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
Milestone
Comments
Simpler repro: let foo = () => async y => await y compiles to function foo(param, y) {
return await y;
} |
cristianoc
added a commit
that referenced
this issue
Feb 6, 2023
Nested curried functions are combined into one, and the async inner function is not generated. This PR Avoids combining nested functions when they are async. Fixes #5980
cristianoc
added a commit
that referenced
this issue
Feb 6, 2023
Nested curried functions are combined into one, and the async inner function is not generated. This PR Avoids combining nested functions when they are async. Fixes #5980
cristianoc
added a commit
that referenced
this issue
Feb 6, 2023
Nested curried functions are combined into one, and the async inner function is not generated. This PR Avoids combining nested functions when they are async. Fixes #5980
@cristianoc Thanks a lot! I can confirm that this solves the original issue that I experienced in our codebase. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While migrating a large project to use async/await, I came across the following problem:
compiles to
which is not valid because the inner function contains an
await
, but is not annotated withasync
.This occurs in both 10.1.2 and current master.
https://rescript-lang.org/try?version=v10.1.2&code=C4TwDgpgBAJghsOAoJABAtgexgVwDYQAUARAMqboQCy2+ExAlEhAB7AQBOAdnHlAGYRgAYwAWAEQRwAXFADOwDgEsuAcygBeAHxQwHCkrkQAPPEQ6NUYoJESpxFAWC796QxADCHCAkwc5mlAA2sQAjMQANFYATMQAugC0WgBScgB0AIIcHHAg0WnocGCESjCaOnByIFzCUIQM5VBwAO5wSs42YpKIJTAMTEA
The text was updated successfully, but these errors were encountered: