Skip to content
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

Bad parsing behaviour for generic arrow type arguments in class heritage / JSX open element #47410

Open
JLHwung opened this issue Jan 12, 2022 · 0 comments
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@JLHwung
Copy link

JLHwung commented Jan 12, 2022

Bug Report

🔎 Search Terms

shift left
type arguments
<<

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions ______ and _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about ____ Generics _____
  • I was unable to test this on prior versions because _______

⏯ Playground Link

Playground link with relevant code

💻 Code

// No parse error.
(class extends f()< <T>(x: T) => T> {});
<Component< <T>(x: T) => T> />;

// Parse error.
(class extends f()<<T>(x: T) => T> {});
<Component<<T>(x: T) => T> />;

🙁 Actual behavior

Parsing error.

🙂 Expected behavior

No parse error. They are equivalent.

Additional Info

Found this issue when working on a similar fix to Babel (babel/babel#14145). This issue is a follow-up to #23996. /cc @Kingwl since you have fixed that issue.

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this labels Jan 12, 2022
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

2 participants