JSAbrahams / mamba

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

Type annotation in class definitions are not preserved #295

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 2 years ago

Description of Bug

Type annotation in class definitions are not preserved, it seems anyway. This isn't a breaking feature, and the type checker does appear to work correctly (as though it is actually annotated). So it really is something with the generation stage.

How to Reproduce

class X(def a: Float)

is converted to:

class X:
    def __init__(self, a):
        self.a = a
JSAbrahams commented 2 years ago

False alarm