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
fix: incorrect await rejection following arrow function in parameters (fixes #13872) #13928
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/49691/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit fe9c3d2:
|
Thanks for finding the problem! I'd prefer if we fixed this by moving the |
Okay @nicolo-ribaudo I will change that. |
Could you also add a test for yield? (function* () {
function f(_=()=>null) {}
yield;
}); |
@nicolo-ribaudo Yeah, I will add test for yield too. |
When parsing an arrow expression, the error is raised when it reaches the stage where the function body is parsed and the expression scope is entered but never exited if the body is an expression.