-
Notifications
You must be signed in to change notification settings - Fork 2k
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
"for thing, i (in|of) things" doesn't compile inside an object definition #3216
Comments
Worth noting that without the o =
key: v for v in a
key: for v in a then v
key: for v in a
v With the o =
key: v for v, i in a
o =
key: for v, i in a then v
o =
key: for v, i in a
v
# All fail with the following error, always with the "v" highlighted
# [stdin]:2:YY: error: unexpected }
# key: [...] for v, i in a [...]
# ^ However, wrapping the loops in parenthesis will work: o =
key: (v for v, i in a)
key: (for v, i in a then v)
key: (for v, i in a
v
) |
Yeah, I meant to mention that. I didn't realise that wrapping them in parens worked -- thanks! I'll leave it open though since it does appear to be a regression. |
Fixes #3216 for declarations in object literals
You guys all rock! Any clues on when the next release including this change will be? |
Tomorrow. Right @jashkenas ? :) |
@xixixao: As soon as @jashkenas approves #3326, I can cut the release. |
This code:
compiled correctly in 1.5.0, but in 1.6.0 and later, it gives this error:
The absence or presence of any of the lines doesn't seem to make much difference -- in other words, removing the "first" line doesn't matter, and both the "second" and "third" lines fail on their own.
The text was updated successfully, but these errors were encountered: