Skip to content

fix(deadcode): account for impure paths inside for statements#834

Merged
boopathi merged 2 commits intomasterfrom
fix-824
May 10, 2018
Merged

fix(deadcode): account for impure paths inside for statements#834
boopathi merged 2 commits intomasterfrom
fix-824

Conversation

@vigneshshanmugam
Copy link
Copy Markdown
Member

@vigneshshanmugam vigneshshanmugam requested a review from boopathi as a code owner May 8, 2018 19:44
@j-f1
Copy link
Copy Markdown
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
Copy Markdown
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