Don't skip constraints from equations with the kind equal
The problem was that we didn't incorporate T == Foo into K <: Inv<out T>. It happened because of optimisation that isn't applicable here as we already have projection in the initial type #KT-39777 Fixed
This commit is contained in:
+4
-3
@@ -221,9 +221,10 @@ class ConstraintIncorporator(
|
||||
val isFromVariableFixation = baseConstraint.position.from is FixVariableConstraintPosition
|
||||
|| otherConstraint.position.from is FixVariableConstraintPosition
|
||||
|
||||
if (!containsConstrainingTypeWithoutProjection(newConstraint, otherConstraint)
|
||||
&& !isUsefulForNullabilityConstraint
|
||||
&& !isFromVariableFixation
|
||||
if (!otherConstraint.kind.isEqual() &&
|
||||
!isUsefulForNullabilityConstraint &&
|
||||
!isFromVariableFixation &&
|
||||
!containsConstrainingTypeWithoutProjection(newConstraint, otherConstraint)
|
||||
) return
|
||||
|
||||
if (trivialConstraintTypeInferenceOracle.isGeneratedConstraintTrivial(
|
||||
|
||||
Reference in New Issue
Block a user