stan-dev / stanc3

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

Make Promotion.get_type_promotion_exn more robust to bad inputs #1293

Closed WardBrian closed 1 year ago

WardBrian commented 1 year ago

Submission Checklist

Release notes

Follow on to #1292. This fixes the names of the arguments and adds a few extra checks which would have caught the bug there originally.

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 1 year ago

Codecov Report

Merging #1293 (b6141bc) into master (2eb708a) will decrease coverage by 0.01%. The diff coverage is 73.91%.

@@            Coverage Diff             @@
##           master    #1293      +/-   ##
==========================================
- Coverage   89.02%   89.02%   -0.01%     
==========================================
  Files          64       64              
  Lines        9744     9747       +3     
==========================================
+ Hits         8675     8677       +2     
- Misses       1069     1070       +1     
Impacted Files Coverage Δ
src/frontend/Promotion.ml 87.71% <73.91%> (-1.17%) :arrow_down: