Skip to content

JavaScript: destructuring binding with default values #4166

@masatake

Description

@masatake

An item not solved in #3435.

If an object literal is specified as a default value in object restructuring, the parser may fail to extract the variable (or constant):

var{ c = {a: 1} } = { c: undefined };
var{ d = {a: 1} } = {d: 3};
var a = 1
var [x0 = {a: 2}, y0] = [, 4];
var [x1 = [a, 2], y1] = [, 4];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions