Closed JSAbrahams closed 3 years ago
Perhaps we should differentiate between tuples and list/sets/dictionaries (once we have dictionaries)
Turning out to be a bit more difficult than anticipated, but the trace messages are proving very helpful. This is however definitely something we want, tuples are sized at compile time, and collections at runtime, so we want to verify the size of tuples.
It seems that the union stage is struggling with tuples, the constraints that are generated initially (and not during the unification stage) seem to be correct, but I have to double check this. But I believe the error is in the unification stage (probably during substitution) currently, or there is some conceptual error in the generation stage.
Relevant Issues
Implements #205
Summary
Keep track of tuple sizes, which can be statically determined, and give error if tuple sizes don't match during assignment.
Added Tests