Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(semantic): collision between external and fresh type vars
Fixes #263. Type inference replaces any external free type variables with new fresh type variables. The result is a new but completely equivalent type expression. Previously during the substitution process collisions could occur between the names of old type variables and the names of the new freshly generated type variables. This would render the new type expression invalid. To remedy this problem, fresh type variables are now generated before being substituted into the original type expression. If there is a collision, that type variable is discarded and a new one is generated.
- Loading branch information