-
-
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: parse a<b>>>c as a<(b>>>c) #14819
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52818/ |
@@ -0,0 +1 @@ | |||
a<b> > c; |
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.
The current TS nightly throws "Expression expected" in this case and the other similar one, which I think is a TS bug. They should be handled as same as a<b> ?? c
.
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.
It looks like this is intentional: microsoft/TypeScript#49353 (cc @ahejlsberg the code above is unambiguous, do you remember why it's disallowed?).
Let's merge it? |
I think we should match TS in #14819 (comment), since it's an intentional restriction. |
Bail out the
TSInstantiateExpression
try parsing when we see>>
immediately after>
without whitespaces.