flofriday / Moose

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

Constructor of BuiltIn Types is valid #7

Closed Jozott00 closed 2 years ago

Jozott00 commented 2 years ago

Currently one could initialize built in types like Int(). This is not checked in typechecker.

flofriday commented 2 years ago

That is true, however I don't quite get it because it will fail in the environment. The Scope and Environment are quite similar so why is it in the scope but not in the environment?

Jozott00 commented 2 years ago

This is fixed now. Before calling a constructor we now check if it is a builtin type