flofriday / Moose

🐐 A new fun programming language
MIT License
6 stars 1 forks source link

Empty list literals don't compile #9

Closed flofriday closed 2 years ago

flofriday commented 2 years ago

Example

Screenshot 2022-08-19 at 18 37 00

Solution

So we probably need a recursive type-match function, where we take the declared type and the value type and check if they do match. At the moment we don't check recursively and only have exceptions for Nil types but since the List Type wraps another we need to do this recursively

flofriday commented 2 years ago

They are working now