Skip to content

Handle debugger statements as if-statement branches#3769

Merged
lukastaegert merged 1 commit intomasterfrom
gh-3766-nested-debugger
Sep 8, 2020
Merged

Handle debugger statements as if-statement branches#3769
lukastaegert merged 1 commit intomasterfrom
gh-3766-nested-debugger

Conversation

@lukastaegert
Copy link
Copy Markdown
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 #3766

Description

The new logic for if-statement simplification that relies on injecting additional scopes to detect hoisted variables introduced a bug where "unknown" nodes, in this case a debugger statement, were no longer properly handled. This is fixed here.

@lukastaegert lukastaegert force-pushed the gh-3766-nested-debugger branch from 0091cda to 6ba68a5 Compare September 8, 2020 05:40
@rollup-bot
Copy link
Copy Markdown
Collaborator

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-3766-nested-debugger

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 8, 2020

Codecov Report

Merging #3769 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3769   +/-   ##
=======================================
  Coverage   97.02%   97.02%           
=======================================
  Files         185      185           
  Lines        6460     6460           
  Branches     1868     1870    +2     
=======================================
  Hits         6268     6268           
  Misses        101      101           
  Partials       91       91           
Impacted Files Coverage Δ
src/ast/nodes/IfStatement.ts 100.00% <100.00%> (ø)

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 fe0bdd6...6ba68a5. Read the comment docs.

@lukastaegert lukastaegert merged commit 6697ee4 into master Sep 8, 2020
@lukastaegert lukastaegert deleted the gh-3766-nested-debugger branch September 8, 2020 05:47
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.

Uninformitive crash dump is generated when 'debugger;' is used

2 participants