JSAbrahams / mamba

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

Generate extra constraint for index #413

Closed JSAbrahams closed 1 year ago

JSAbrahams commented 1 year ago

Relevant issues

Summary

We now also wrap the entire AST so that it is constrained with a collection with the type of the local temp var. This temp var is resolved during the unification stage, giving the type of the entire expression.

Added Tests

codecov[bot] commented 1 year ago

Codecov Report

Merging #413 (f96722e) into develop (15077f1) will decrease coverage by 0.02%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #413      +/-   ##
===========================================
- Coverage    87.55%   87.52%   -0.03%     
===========================================
  Files          109      109              
  Lines        12016    12020       +4     
===========================================
  Hits         10521    10521              
- Misses        1495     1499       +4     
Impacted Files Coverage Δ
src/check/constrain/generate/call.rs 88.10% <100.00%> (+0.21%) :arrow_up:
src/check/constrain/generate/collection.rs 81.81% <0.00%> (-6.07%) :arrow_down: