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

Mark compound assignments as not binding elements #274

Merged
merged 1 commit into from
Feb 23, 2016

Conversation

bakkot
Copy link
Member

@bakkot bakkot commented Feb 23, 2016

Fixes #189 and #255.

Note that the two additional tests in update-expression.js were actually fixed by a30696c, but they're added here as part of closing #189.

As this PR closes all remaining known bugs except #130 and #168, it's probably time for a patch version bump + publish.

let node = operator.type === TokenType.ASSIGN
? { type: "AssignmentExpression", binding: expr, expression: rhs }
: { type: "CompoundAssignmentExpression", binding: expr, operator: operator.type.name, expression: rhs };
if (operator.type !== TokenType.ASSIGN) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't like doing this test twice in a row. Let's combine these two statements.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

michaelficarra added a commit that referenced this pull request Feb 23, 2016
Mark compound assignments as not binding elements
@michaelficarra michaelficarra merged commit b6799ce into es6 Feb 23, 2016
@bakkot bakkot deleted the compound-assign-fix branch February 23, 2016 18:15
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.

2 participants