Microsoft/TypeScript

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

Open

#59.236 aberto em 11 de jul. de 2024

Ver no GitHub
 (7 comments) (0 reactions) (0 assignees)TypeScript (6.726 forks)batch import
BugDomain: ParserHelp Wanted

Métricas do repositório

Stars
 (48.455 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)

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

Guia do colaborador