Skip to content

[CS2] Destructuring invalid LHS generates invalid JS #4673

@connec

Description

@connec

See http://coffeescript.org/v2/#try:%7B%20%7Bb...%7D...%20%7D%20%3D%20c

{ {b...}... } = c

Compiles to:

({} = c);
Object.assign({}, b) = objectWithoutKeys(c, []);

I suspect we're missing something when verifying that an object is a valid LHS. Specifically, when a splat is present it's name must be a valid LHS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions