-
Notifications
You must be signed in to change notification settings - Fork 156
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
Surprising implicit shorthand property behavior #1038
Comments
In my opinion, the most straightforward reading of the docs implies that you're correct. However, every tagged version of LiveScript that I tested, as well as Coco, all do the same thing with that expression. A fix would be relatively simple—swapping the order of I'm on the fence about changing this. Anyone else have any opinions? |
i thought about |
The more I think about this, the more I agree with you, @pepkin88. This seems like a bug. Property shorthand should not work outside of braces. The cases in your postscript make that clear: |
The code:
compiles to this:
and not to this:
like
[a: 1, 2, 3]
would.Are my expectations correct? Should
[a: 1 2 3]
be equivalent to[a: 1, 2, 3]
?Edit: Same with
fn a: 1 2 3
,v = a: 1 2 3
, etc.The text was updated successfully, but these errors were encountered: