You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parsing error for for (await using of of of) {}Β #55555
Does this ever happen with real code, or is it just an attempt to intentionally break the parser?
It's a spec conformance issue. The spec specifically forbids for (using of of since that can be ambiguous (using could be an identifier like x in for (x of of, or of could be either an identifier or a keyword), while for (await using of of is unambiguous (await using can only imply the declaration, thus await using of must declare an identifier).
Activity
fisker commentedon Aug 29, 2023
sosukesuzuki commentedon Aug 29, 2023
MartinJohns commentedon Aug 29, 2023
Does this ever happen with real code, or is it just an attempt to intentionally break the parser?
sosukesuzuki commentedon Aug 29, 2023
I didn't see this with real code but I didn't intentionally break the parser, I just noticed it while developing the code formatter.
DanielRosenwasser commentedon Aug 29, 2023
(congrats on issue #55555!)
rbuckton commentedon Oct 30, 2023
It's a spec conformance issue. The spec specifically forbids
for (using of ofsince that can be ambiguous (usingcould be an identifier likexinfor (x of of, orofcould be either an identifier or a keyword), whilefor (await using of ofis unambiguous (await usingcan only imply the declaration, thusawait using ofmust declare an identifier).