Skip to content
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

Inconsistent empty splat assignment #858

Closed
summivox opened this issue Feb 21, 2016 · 3 comments
Closed

Inconsistent empty splat assignment #858

summivox opened this issue Feb 21, 2016 · 3 comments

Comments

@summivox
Copy link
Contributor

[..., a, b] = [1]
[...x, y, z] = [1]
a is void and b is 1 and
x.length is 0 and y is 1 and z is void

Since line 2 is widely accepted as the correct behavior (i.e. splat cannot "unconsume") I don't see why line 1 shouldn't.

@vendethiel
Copy link
Contributor

Seems correct. Also a breaking change.

@summivox
Copy link
Contributor Author

Also a breaking change

Maybe label this for 2.0 and forget about it for now 😉

@vendethiel
Copy link
Contributor

Yes, probably.

vendethiel added a commit that referenced this issue Mar 2, 2016
Fix #858 Inconsistent empty splat assignment
This was referenced Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants