JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
88 stars 4 forks source link

Remove constraint variant either #369

Closed JSAbrahams closed 1 year ago

JSAbrahams commented 1 year ago

Relevant issues

Resolves #366 Should make an issue to discuss whether we want to allow different types for arms of match and if expressions: #370

Summary

This was redundant and added unnecessary logic I believe. One problem is that now that the arms of an if expression must always match. One cool feature would be that the language then instead takes a union of these two types and continues on.

Added Tests

codecov[bot] commented 1 year ago

Codecov Report

Merging #369 (b5afaeb) into develop (02f25d9) will decrease coverage by 0.17%. The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #369      +/-   ##
===========================================
- Coverage    87.07%   86.89%   -0.18%     
===========================================
  Files          108      108              
  Lines        11965    11958       -7     
===========================================
- Hits         10418    10391      -27     
- Misses        1547     1567      +20     
JSAbrahams commented 1 year ago

Well, the reduction is coverage is unfortunate. But not much we can do about it in this PR I think.