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

Comments

Projects
None yet
2 participants
@summivox
Contributor

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

This comment has been minimized.

Contributor

vendethiel commented Feb 21, 2016

Seems correct. Also a breaking change.

@summivox

This comment has been minimized.

Contributor

summivox commented Feb 21, 2016

Also a breaking change

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

@vendethiel

This comment has been minimized.

Contributor

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

Merge pull request #860 from summivox/fix-empty-splat
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