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 for #511 #512

Merged
merged 7 commits into from
Aug 4, 2023
Merged

Fix for #511 #512

merged 7 commits into from
Aug 4, 2023

Conversation

torfjelde
Copy link
Member

Because we add a return to the last statement in the model body before replacing returns + we don't recursively call replace_returns! on the args to the return statement, we run into issues when the last statement in the body itself contains return (as in #511).

This PR addresses this issue.

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Patch coverage: 75.00% and project coverage change: +0.02% 🎉

Comparison is base (5dd7c53) 75.47% compared to head (11acfd4) 75.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #512      +/-   ##
==========================================
+ Coverage   75.47%   75.49%   +0.02%     
==========================================
  Files          23       23              
  Lines        2764     2763       -1     
==========================================
  Hits         2086     2086              
+ Misses        678      677       -1     
Files Changed Coverage Δ
src/compiler.jl 93.65% <75.00%> (+0.45%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/compiler.jl Outdated Show resolved Hide resolved
@torfjelde
Copy link
Member Author

Feel free to merge this as soon as someone has approved and the tests have passed 👍

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Pull Request Test Coverage Report for Build 5764647699

  • 3 of 4 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 75.498%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/compiler.jl 3 4 75.0%
Totals Coverage Status
Change from base Build 5707142959: 0.03%
Covered Lines: 2086
Relevant Lines: 2763

💛 - Coveralls

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not completely familiar with the previous implementation but looks good to me.

@yebai yebai enabled auto-merge August 4, 2023 18:48
@yebai yebai added this pull request to the merge queue Aug 4, 2023
Merged via the queue into master with commit aa13dcf Aug 4, 2023
11 of 13 checks passed
@yebai yebai deleted the torfjelde/fix-511 branch August 4, 2023 19:15
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.

3 participants