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 has_side_effects() #1675

Merged
merged 1 commit into from
Mar 25, 2017
Merged

fix has_side_effects() #1675

merged 1 commit into from
Mar 25, 2017

Conversation

alexlamsl
Copy link
Collaborator

AST_Try is an AST_Block with extra blocks that also need to scan for side-effects.

Also extend this functionality to handle AST_If and AST_LabeledStatement while we are at it.

fixes #1673

`AST_Try` is an `AST_Block` with extra blocks that also need to scan for side-effects.

Also extend this functionality to handle `AST_If` and `AST_LabeledStatement` while we are at it.

fixes mishoo#1673
@kzc
Copy link
Contributor

kzc commented Mar 25, 2017

@alexlamsl In the commit description could you mention "respect finally block if try block is empty"?

@alexlamsl
Copy link
Collaborator Author

How about:

`AST_Try` is an `AST_Block`, so besides try block we also need to inspect catch and finally blocks for possible side effects.

Basically try block doesn't need to be empty as long as it's side-effect-free. Also this bug would trigger for catch blocks with side effects as well.

@kzc
Copy link
Contributor

kzc commented Mar 25, 2017

I see. Sure.

The commit descriptions should be easy enough to understand for non-technical users to see that they need a certain version to overcome a certain bug. Which is why it would be good to mention "finally" in the commit.

@alexlamsl
Copy link
Collaborator Author

The commit descriptions should be easy enough to understand for non-technical users to see that they need a certain version to overcome a certain bug. Which is why it would be good to mention "finally" in the commit.

You are the language expert in this project 😎👍

@alexlamsl alexlamsl merged commit b19aa58 into mishoo:master Mar 25, 2017
@alexlamsl alexlamsl deleted the issue-1673 branch March 25, 2017 15:03
@kzc
Copy link
Contributor

kzc commented Mar 25, 2017

You are the language expert in this project

I don't know about that. Just thinking from an end user's perspective. Since we don't produce release notes, the commit log is all we got.

alexlamsl added a commit to alexlamsl/UglifyJS that referenced this pull request Mar 25, 2017
alexlamsl added a commit that referenced this pull request Mar 26, 2017
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.

Bug: finally ignored
2 participants