Microsoft/TypeScript

Parse error when using `in` nested in a `for` initializer

Open

#59 236 ouverte le 11 juil. 2024

Voir sur GitHub
 (7 commentaires) (0 réactions) (0 assignés)TypeScript (6 726 forks)batch import
BugDomain: ParserHelp Wanted

Métriques du dépôt

Stars
 (48 455 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (9 PRs mergées en 30 j)

Description

🔎 Search Terms

in for in init syntax error

🕗 Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.5.3#code/GYewTgBAFAbghpOEC8EDaAjCBLAdhAYwF0BuEgShKA

💻 Code

for (var a = [b in c];;);

🙁 Actual behavior

It says "',' expected." at the in

🙂 Expected behavior

It should parse it properly

Additional information about the issue

No response

Guide contributeur