stan-dev / stanc3

The Stan transpiler (from Stan to C++ and beyond).
BSD 3-Clause "New" or "Revised" License
140 stars 44 forks source link

Fix: Two reject statements in the same scope causes C++ compilation to fail #1396

Closed WardBrian closed 8 months ago

WardBrian commented 8 months ago

This would be useless code, so it is relatively benign, but it still shouldn't cause a compile failure.

Submission Checklist

Release notes

Fixed an issue where multiple reject statements could cause the C++ compiler to fail

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8f2dbe7) 89.88% compared to head (771f372) 89.88%. Report is 10 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1396 +/- ## ======================================= Coverage 89.88% 89.88% ======================================= Files 63 63 Lines 10505 10506 +1 ======================================= + Hits 9442 9443 +1 Misses 1063 1063 ``` | [Files](https://app.codecov.io/gh/stan-dev/stanc3/pull/1396?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stan-dev) | Coverage Δ | | |---|---|---| | [src/frontend/Typechecker.ml](https://app.codecov.io/gh/stan-dev/stanc3/pull/1396?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stan-dev#diff-c3JjL2Zyb250ZW5kL1R5cGVjaGVja2VyLm1s) | `91.97% <100.00%> (ø)` | | | [src/stan\_math\_backend/Lower\_stmt.ml](https://app.codecov.io/gh/stan-dev/stanc3/pull/1396?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stan-dev#diff-c3JjL3N0YW5fbWF0aF9iYWNrZW5kL0xvd2VyX3N0bXQubWw=) | `95.38% <100.00%> (+0.02%)` | :arrow_up: |