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

@summivox summivox commented Feb 21, 2016

[..., 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

@vendethiel vendethiel commented Feb 21, 2016

Seems correct. Also a breaking change.

@summivox
Copy link
Contributor Author

@summivox summivox commented Feb 21, 2016

Also a breaking change

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

@vendethiel
Copy link
Contributor

@vendethiel vendethiel commented Feb 21, 2016

Yes, probably.

@vendethiel vendethiel closed this in f18a91c Mar 2, 2016
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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants