Microsoft/TypeScript

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

オープン

#59,236 opened on 2024/07/11

 (7 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (13,395 件のフォーク)batch import
BugDomain: ParserHelp Wanted

Repository metrics

Stars
 (108,860 個のスター)
PR merge metrics
 (平均マージ 6d 17h) (30d で 9 merged PRs)

説明

🔎 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

コントリビューターガイド