Microsoft/TypeScript

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

Open

#59,236 创建于 2024年7月11日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)TypeScript (6,726 fork)batch import
BugDomain: ParserHelp Wanted

仓库指标

Star
 (48,455 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 9 个 PR)

描述

🔎 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

贡献者指南