Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Array destructuring issue #607

Closed
zamb3zi opened this issue Jun 30, 2017 · 3 comments
Closed

Array destructuring issue #607

zamb3zi opened this issue Jun 30, 2017 · 3 comments
Labels
bug Confirmed bug

Comments

@zamb3zi
Copy link

zamb3zi commented Jun 30, 2017

This is very similar to #151 and is occurring on the current master version.

Input

function foo(arg) {
    const {
        x: [x],
        y: [y],
    } = arg;
    return x;
}

Output

function foo(a){return b}

REPL

Compared with the following correct behaviour:

Input

function foo(arg) {
    const {
        x: [x],
        y: [y],
    } = arg;
    return x + y;
}

Output

function foo(a){const{x:[b],y:[c]}=a;return b+c}

REPL

@boopathi boopathi added the bug Confirmed bug label Jun 30, 2017
@boopathi
Copy link
Member

Interesting. Thanks. Looks like a bug in DCE. Will try this.

@boopathi
Copy link
Member

boopathi commented Jul 8, 2017

Fixed by #622

@boopathi boopathi closed this as completed Jul 8, 2017
@zamb3zi
Copy link
Author

zamb3zi commented Jul 10, 2017

Confirmed, my test cases are now working.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants