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(deadcode): account for impure paths inside for statements #834

Merged
merged 2 commits into from
May 10, 2018

Conversation

vigneshshanmugam
Copy link
Member

@j-f1
Copy link
Contributor

j-f1 commented May 8, 2018

What happens if there’s a side-effectful expression in the update/condition parts of the loop?

@vigneshshanmugam
Copy link
Member Author

Shouldn't be a problem since we are doing this transform only if test statement is pure. The update path won't be executed at all in these cases.

@boopathi boopathi added the Tag: Bug Fix Pull Request fixes a bug label May 10, 2018
@boopathi boopathi merged commit 5f60189 into master May 10, 2018
@boopathi boopathi deleted the fix-824 branch May 10, 2018 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tag: Bug Fix Pull Request fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

simplify's loop rewriting incorrectly removes preceding variable declarations
3 participants