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

Add cases for Optional Expressions as DestructuringAssignmentTarget #2270

Merged
merged 2 commits into from
Aug 5, 2019

Conversation

leobalter
Copy link
Member

Copy link
Contributor

@rwaldron rwaldron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonkers.

@rwaldron rwaldron merged commit 8893f7a into tc39:master Aug 5, 2019
@leobalter leobalter deleted the 2263/dstr-assign-optexpr branch August 5, 2019 15:12
Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, missed the merge 😄

had a couple questions, mostly me learning the test framework and spec (nothing that would block the merge).

//- elems
[x?.y = 42]
//- vals
[23]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what purpose does [23] serve here?

$DONOTEVALUATE();
var x = {};
//- elems
[x?.y]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ does [x.y] without a RHS evaluate as a destructuring assignment?

I think I would have assumed that this was an [ Expression ]. Would this production work:

const arr = [x?.y, x?.z];

set y(val) {
throw new Test262Error('The property should not be accessed.');
}
}?.y]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as above, probably me failing to read this production properly.

@leobalter
Copy link
Member Author

@rkirsling I edited your comment to fix the links

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

Successfully merging this pull request may close these issues.

4 participants