JSAbrahams / mamba

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

Treat Range as List[Int] #268

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 2 years ago

Relevant issues

Closes #260

Summary

Insert a Range(List[Int]) class in built-in Python resources. The type checker should detect that this is a type of collection, and then match the List[Int] with List[Int] when matching a Collection { exp } with Type { .. }.

Expand generics so that to make use of the fact that, for instance, Range is a type of List[Int] which is a type of Collection[Int].

Added Tests

codecov[bot] commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@268ad5c). Click here to learn what that means. The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop     #268   +/-   ##
==========================================
  Coverage           ?   83.71%           
==========================================
  Files              ?       99           
  Lines              ?     9723           
  Branches           ?        0           
==========================================
  Hits               ?     8140           
  Misses             ?     1583           
  Partials           ?        0           

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more