JSAbrahams / mamba

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

Fix top-level tuple declarations #263

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 2 years ago

Relevant issues

Closes #253

Ideally should've been part of release v0.3.1, but I forgot about this.

Summary

In short, we get:

def (a, b) := (20, 20)

class MyClass:
    def (a, b): (Int, Int) := (20, 20)

print(MyClass().a)
print(MyClass().b)

Added Tests

codecov[bot] commented 2 years ago

Codecov Report

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

@@            Coverage Diff             @@
##             develop     #263   +/-   ##
==========================================
  Coverage           ?   83.52%           
==========================================
  Files              ?       99           
  Lines              ?     9584           
  Branches           ?        0           
==========================================
  Hits               ?     8005           
  Misses             ?     1579           
  Partials           ?        0           

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