Skip to content

Array destructuring issue #607

@zamb3zi

Description

@zamb3zi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions