-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 parsing type casted generic flow arrow exprs #11955
Conversation
existentialism
commented
Aug 12, 2020
•
edited by gitpod-io
bot
Loading
edited by gitpod-io
bot
Q | A |
---|---|
Fixed Issues? | Fixes #11716 |
Patch: Bug Fix? | Y |
License | MIT |
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 501ebd0:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While reviewing this PR, I realize there are two invalid cases related to how we handle parenItem
and generic arrow:
<T> async () => {}
should throw but it is passed because we didn't validate arrowExpression.async
.
(<T>() => {}?:any);
should throw but ?
is incorrectly eaten in parseParenItem
.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/27618/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the same tests but with enableParenthesizedExpressions
?