Skip to content

Fix5004: incorrect compiled code when a destructuring array contains accessors - #5005

Merged
GeoffreyBooth merged 1 commit into
jashkenas:masterfrom
zdenko:issue5004
Mar 7, 2018
Merged

GeoffreyBooth merged 1 commit into
jashkenas:masterfrom
zdenko:issue5004

Conversation

@zdenko

@zdenko zdenko commented Mar 5, 2018

Copy link
Copy Markdown
Collaborator

Fixes #5004.

[@all_but_last_two... , @penultimate, @last] = array

###
[...this.all_but_last_two] = array, [this.penultimate, this.last] = splice.call(this.all_but_last_two, -2);
###

[obj.first , obj.middle..., obj.last] = array

###
[obj.first, ...obj.middle] = array, [obj.last] = splice.call(obj.middle, -1);
###

@GeoffreyBooth
GeoffreyBooth merged commit 4c0363f into jashkenas:master Mar 7, 2018
@GeoffreyBooth GeoffreyBooth mentioned this pull request Mar 10, 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

Successfully merging this pull request may close these issues.

Nodes: array destructuring is broken in some cases and leads to TypeError

2 participants