JSAbrahams / mamba

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

Add check for if type exists in unification stage #429

Closed JSAbrahams closed 1 year ago

JSAbrahams commented 1 year ago

Summary

In unfication stage, before typing a node in an AST, do final check to see if type exists. Doing this here means that we don't have to spread out this logic everywhere.

Added Tests

Sad

codecov[bot] commented 1 year ago

Codecov Report

Merging #429 (f14bf6f) into develop (b7569cb) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #429      +/-   ##
===========================================
+ Coverage    88.41%   88.43%   +0.02%     
===========================================
  Files          110      110              
  Lines        12019    12040      +21     
===========================================
+ Hits         10627    10648      +21     
  Misses        1392     1392              
Impacted Files Coverage Δ
src/check/constrain/unify/finished.rs 100.00% <100.00%> (ø)
src/check/constrain/unify/link.rs 93.75% <100.00%> (+0.20%) :arrow_up:
src/check/constrain/unify/ty.rs 84.04% <100.00%> (ø)
src/check/name/mod.rs 96.28% <100.00%> (+0.03%) :arrow_up:
src/check/name/name_variant.rs 61.79% <100.00%> (+2.27%) :arrow_up:
src/check/name/string_name/mod.rs 78.83% <100.00%> (+0.47%) :arrow_up:
src/check/name/true_name/mod.rs 75.47% <100.00%> (+0.71%) :arrow_up: