[NI] Don't skip constraints with projections during variable fixation

Those constraints are only restored for variable fixation stage because of the
influence on pefrormance.

^KT-37650 Fixed
^KT-37380 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-03-23 15:45:32 +03:00
parent 1f6834538b
commit adf3351a8b
11 changed files with 59 additions and 17 deletions
@@ -209,8 +209,14 @@ class ConstraintIncorporator(
val isUsefulForNullabilityConstraint =
isPotentialUsefulNullabilityConstraint(newConstraint, otherConstraint.type, otherConstraint.kind)
val isFromVariableFixation = baseConstraint.position.from is FixVariableConstraintPosition
|| otherConstraint.position.from is FixVariableConstraintPosition
if (!containsConstrainingTypeWithoutProjection(newConstraint, otherConstraint)
&& !isUsefulForNullabilityConstraint
&& !isFromVariableFixation
) return
if (!isUsefulForNullabilityConstraint && !containsConstrainingTypeWithoutProjection(newConstraint, otherConstraint)) return
if (trivialConstraintTypeInferenceOracle.isGeneratedConstraintTrivial(
baseConstraint, otherConstraint, newConstraint, isSubtype
)