diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt index 4dad5c63232..6e3f465e622 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt @@ -182,6 +182,7 @@ class ConstraintInjector( // from ConstraintIncorporator.Context override fun addNewIncorporatedConstraint(lowerType: KotlinTypeMarker, upperType: KotlinTypeMarker) { + if (lowerType === upperType) return if (c.isAllowedType(lowerType) && c.isAllowedType(upperType)) { runIsSubtypeOf(lowerType, upperType) }