-
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
[CS2] Destructuring invalid LHS generates invalid JS #4673
Labels
Comments
Whoops, never mind - I was looking at a different example. { a: {b...} = {c...} } = z |
@connec It’s actually a little worse than your initial comment. Look at the var Object.assign({}, b), b,
objectWithoutKeys = function(o, ks) { var res = {}; for (var k in o) ([].indexOf.call(ks, k) < 0 && {}.hasOwnProperty.call(o, k)) && (res[k] = o[k]); return res; };
({} = c);
Object.assign({}, b) = objectWithoutKeys(c, []);
|
GeoffreyBooth
pushed a commit
that referenced
this issue
Sep 7, 2017
Fixed by #4683. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://coffeescript.org/v2/#try:%7B%20%7Bb...%7D...%20%7D%20%3D%20c
Compiles to:
I suspect we're missing something when verifying that an object is a valid LHS. Specifically, when a splat is present it's name must be a valid LHS.
The text was updated successfully, but these errors were encountered: