Select non-DeclaredUpperBound for initial when simplifying constraint

This commit is contained in:
Simon Ogorodnik
2021-10-28 13:14:53 +03:00
committed by teamcity
parent 91b629d16a
commit 6cf2c6f93a
@@ -73,7 +73,8 @@ class MutableVariableWithConstraints private constructor(
Constraint(
ConstraintKind.EQUALITY,
constraint.type,
constraint.position,
constraint.position.takeIf { it.from !is DeclaredUpperBoundConstraintPosition<*> }
?: previousConstraint.position,
constraint.typeHashCode,
derivedFrom = constraint.derivedFrom,
isNullabilityConstraint = false