You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I couldn't find where these circumstances are explained. Have I missed it?
If my understand is correct, then in a context like the one below, the refinement should apply:
let o = { x: "s", y: 0 };
({x: v, y: w} = o);
In one case or another, the spec should clarify — if isn't yet doing so — what the circumstances in question are; if this is already clarified and I've missed it, it might be worth to link the clarification in section 13.15.5.
The text was updated successfully, but these errors were encountered:
If my understand is correct, then in a context like the one below, the refinement should apply:
let o = { x: "s", y: 0 };
({x: v, y: w} = o);
Yes, I think so. {x: v, y: w} is initially parsed as a LeftHandSideExpression (consisting of an ObjectLiteral), and then as an AssignmentPattern (consisting of an ObjectAssignmentPattern).
Thanks for clarifying @jmdyck! I'm leaving this open nevertheless in case the editors would consider an explicit pointer for the explanation of the circumstances.
In 13.15.5 Destructuring Assignment, we have:
"In certain circumstances when processing an instance of the production AssignmentExpression : LeftHandSideExpression = AssignmentExpression the interpretation of LeftHandSideExpression is refined using the following grammar: ..."
But I couldn't find where these circumstances are explained. Have I missed it?
If my understand is correct, then in a context like the one below, the refinement should apply:
In one case or another, the spec should clarify — if isn't yet doing so — what the circumstances in question are; if this is already clarified and I've missed it, it might be worth to link the clarification in section 13.15.5.
The text was updated successfully, but these errors were encountered: