Skip to content

[CS2] Fix object spread nested properties#4611

Merged
GeoffreyBooth merged 2 commits into
jashkenas:2from
GeoffreyBooth:object-spread-nested-properties-fix
Jul 23, 2017
Merged

[CS2] Fix object spread nested properties#4611
GeoffreyBooth merged 2 commits into
jashkenas:2from
GeoffreyBooth:object-spread-nested-properties-fix

Conversation

@zdenko

@zdenko zdenko commented Jul 11, 2017

Copy link
Copy Markdown
Collaborator

@GeoffreyBooth I noticed an error with the object spread nested properties in branch 2, e.g.
obj2 = {obj.a.b.c..., obj["a"]["b"]...}

This has been already fixed in #4493, but it seems that something went off in the latest commits.
This small PR restores the functionality back.

@connec do you mind taking a look since your commits also include changes in the grammar?

@GeoffreyBooth GeoffreyBooth changed the title fix for object spread nested properties [CS2] Fix object spread nested properties Jul 12, 2017
@zdenko

zdenko commented Jul 19, 2017

Copy link
Copy Markdown
Collaborator Author

@connec were you able to check this PR?

@connec

connec commented Jul 20, 2017

Copy link
Copy Markdown
Collaborator

This still breaks if accesses are mixed with indices 😢

[stdin]:1:18: error: unexpected .
obj2 = { obj["a"].b... }
                 ^

@zdenko

zdenko commented Jul 20, 2017

Copy link
Copy Markdown
Collaborator Author

@connec are you sure? It's working for me.
I also added a couple of tests.

@connec connec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably checked out the wrong branch 😓 thanks for adding the tests though!

👍

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.

3 participants