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

Prevent ... as array element in right-hand side #1138

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

edemaine
Copy link
Collaborator

@edemaine edemaine commented Apr 2, 2024

Fixes #1132

The comment says NOTE: Allow empty exp spread for destructuring but I think this was before there was pattern matching, and a separate set of rules for left-hand sides where ... is still allowed. For example, function f([a, ..., b]) is still allowed, as is [a, ..., b] = c. The latter has a bug, which I'll raise separately (#1139).

Let me know if you see a way that this could be relevant. It's at least not breaking any tests.

@edemaine edemaine merged commit 8122046 into main Apr 3, 2024
3 checks passed
@edemaine edemaine deleted the empty-spread branch April 3, 2024 12:01
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

Successfully merging this pull request may close these issues.

Empty spread invents identifier
2 participants