Don't stop constraints processing if all type variables have proper equality constraints
Those type variable may have other constraints after incorporation into which, the constraint error may appear ^KT-42042 Fixed
This commit is contained in:
-11
@@ -122,17 +122,6 @@ class ConstraintInjector(
|
||||
constraintIncorporator.incorporate(typeCheckerContext, typeVariable, constraintToIncorporate)
|
||||
}
|
||||
}
|
||||
|
||||
val contextOps = c as? ConstraintSystemOperation
|
||||
if (!typeCheckerContext.hasConstraintsToProcess() ||
|
||||
(contextOps != null && c.notFixedTypeVariables.all { typeVariable ->
|
||||
typeVariable.value.constraints.any { constraint ->
|
||||
constraint.kind == EQUALITY && contextOps.isProperType(constraint.type)
|
||||
}
|
||||
})
|
||||
) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user