-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Parse error when using in
nested in a for
initializer
#59236
Labels
Milestone
Comments
Also for (var a = (x = b in c) => {};;); |
Sounds like a duplicate of #9978. Or is there a reason to write code like that? |
This is about a for loop, not a for-in loop. |
What would be the correct js output here? Writing this as pure javascript returns the same error |
The correct JS output here is the same as the input. This code throws |
@jesus-diaz-rivero If you want some code that does not throw at runtime: var b = "";
var c = {};
for (var a = [b in c]; false;); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
π Search Terms
in for in init syntax error
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.5.3#code/GYewTgBAFAbghpOEC8EDaAjCBLAdhAYwF0BuEgShKA
π» Code
π Actual behavior
It says "',' expected." at the
in
π Expected behavior
It should parse it properly
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: