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

Ensure transformFlags are correct before visiting a node. #12039

Merged
merged 1 commit into from
Nov 4, 2016
Merged

Conversation

rbuckton
Copy link
Member

@rbuckton rbuckton commented Nov 4, 2016

When transforming a SpreadElementExpression in a CallExpression, we call createCallBinding which may return a new expression containing an existing subtree. However, this new expression has not had its transform flags computed. Then, when we go to visit the target, our visitor thinks there is nothing to do since no flags are set. To fix this, and catch any future instances of this issue, we will now call aggregateTransformFlags prior to visiting any node to ensure the flags are computed.

Fixes #12010

@rbuckton rbuckton added the Domain: Transforms Relates to the public transform API label Nov 4, 2016
@rbuckton
Copy link
Member Author

rbuckton commented Nov 4, 2016

// CC: @mhegazy

@rbuckton rbuckton merged commit defc053 into master Nov 4, 2016
@rbuckton rbuckton deleted the fix12010 branch November 4, 2016 06:38
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: Transforms Relates to the public transform API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES6 spread syntax does not properly compile when targeting ES3/ES5
3 participants