You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix constraint merges with conflicting type variables
When merging two constraints we can end up in a situation where
a type lambda is associated with different type variables in the
two constraint.
This happened when compiling concat.scala after
introducing an additional tryEither for typechecking the function
part of an application. That caused a constraint merge of
two constraints over logically separate instances of `++`, which
shared the same type lambda for `++` but associated it with
different type variables. This situation can arise since for efficiency
we do not always clone a type lambda before adding it to a constraint.
The correct way to deal with the situation is to clone the
type lambda with the conflicting TypeVars in one of the constraints
before proceeding with the merge.
0 commit comments