JSAbrahams / mamba

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

Cannot use tuple as a class #223

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 2 years ago

Description of Bug

When giving a class a tuple type, we get a type error where we expect an identifier. Instead, this should be interpreted as a type.

How to Reproduce

Compile: class MyTuple: (Int, Int, String) Get error:

[error | type] Expected identifier, was type
   1 | class MyTuple: (Int, Int, String)
                                       ^

Expected behavior

Class should be a tuple type with the relevant types.