snirk-lang / protosnirk

The beginnings of a programming language
MIT License
1 stars 1 forks source link

Write unit tests which verify properties of the AST #99

Open SnirkImmington opened 5 years ago

SnirkImmington commented 5 years ago

I had to open #98 because of ScopedIds being duplicated between function parameters and their main block. I wrote a general test to try and cover some more usecases but for now we just hope that the type checker looks at them and gets confused. There shouldn't be a reason within the code to check ScopedId integrity outside of a dedicated test.

I've already proposed changes like #41, and concerns with the way IDs are generated in #42, this may still be worth implementing before big changes to internal representations.