Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

JavaScript: destructuring binding with default values #4166

Open
masatake opened this issue Jan 1, 2025 · 0 comments
Open

JavaScript: destructuring binding with default values #4166

masatake opened this issue Jan 1, 2025 · 0 comments

Comments

@masatake
Copy link
Member

masatake commented Jan 1, 2025

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], y`] = [, 4];
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

No branches or pull requests

1 participant