Skip to content

for (using of = is incorrectly parsed. #61747

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

Open
rbuckton opened this issue May 21, 2025 · 0 comments
Open

for (using of = is incorrectly parsed. #61747

rbuckton opened this issue May 21, 2025 · 0 comments

Comments

@rbuckton
Copy link
Contributor

rbuckton commented May 21, 2025

πŸ”Ž Search Terms

for using of explicit resource management

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

https://www.typescriptlang.org/play/?lib=lib.esnext.d.ts&ts=lib.esnext.d.ts#code/GYewTgBAFArgzgSwHYHMImBAvBJMA2+A3EQJQQBGYApgIYDWRQA

πŸ’» Code

for (using of = null;;) break;

πŸ™ Actual behavior

Reports multiple errors as a result of failed parse, including:

  • Expression expected.
  • ')' expected.

πŸ™‚ Expected behavior

It should parse successfully, much like the following:

for (var of = null;;) break;
for (let of = null;;) break;
for (const of = null;;) break;

Additional information about the issue

This was discussed in the Explicit Resource Management Repo here: tc39/proposal-explicit-resource-management#248

The test262 test for this can be found here: tc39/test262@fc3079a#diff-4ea0f4ef51852a9dec7036a93ec9576c387d2ad22eaf63992e36f81919c75ce3R14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy