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

Prevent ASI when simplifying a nested logical expression #3734

Merged
merged 1 commit into from Aug 16, 2020

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
Resolves #3729

Description

There was one situation left in #3279 where a logical expression was simplified that was nested in one that was not simplified. In that situation, still an unintended ASI could happen which is hereby resolved.

@rollup-bot
Copy link
Collaborator

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#gh-3729-prevent-logical-asi

or load it into the REPL:
https://rollupjs.org/repl/?circleci=12649

@codecov
Copy link

codecov bot commented Aug 16, 2020

Codecov Report

Merging #3734 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3734   +/-   ##
=======================================
  Coverage   96.98%   96.98%           
=======================================
  Files         184      184           
  Lines        6431     6432    +1     
  Branches     1862     1862           
=======================================
+ Hits         6237     6238    +1     
  Misses        103      103           
  Partials       91       91           
Impacted Files Coverage Δ
src/ast/nodes/LogicalExpression.ts 98.76% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c7b808...3e2945a. Read the comment docs.

@lukastaegert lukastaegert merged commit 9950a4d into master Aug 16, 2020
@lukastaegert lukastaegert deleted the gh-3729-prevent-logical-asi branch August 16, 2020 18:51
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.

Invalid dead code removal for return statement due to ASI
2 participants