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

Fix assignments inside inline function expressions #3158

Merged
merged 3 commits into from
Jul 3, 2019
Merged

Conversation

Rich-Harris
Copy link
Member

The instrumentation was wonky for two reasons:

  • it was inserting code before semi-colons that should have gone after semi-colons
  • it was tracking which assignments needed instrumentation on the way 'down' the AST, meaning they were getting applied prematurely if a suitable place (i.e. the next expression statement it found) was found further in. now, it tracks those assignments on the way 'up'

fixes #3038

@Rich-Harris Rich-Harris merged commit 7efbe7b into master Jul 3, 2019
@Rich-Harris Rich-Harris deleted the gh-3038 branch July 3, 2019 15:09
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.

"Unexpected token" when expression with function involving return statement is assigned to non-local variable
1 participant