diff --git a/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt b/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt index 0b6d062e716..58592e5e654 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt @@ -286,7 +286,11 @@ abstract class AbstractTypeApproximator(val ctx: TypeSystemInferenceExtensionCon // Once NI will be more stabilized, we'll use more specific type - else -> type.typeConstructorProjection().getType()//.unwrap() + else -> { + val projection = type.typeConstructorProjection() + if (projection.isStarProjection()) intersectTypes(supertypes.toList()) + else projection.getType() + } } val baseSubType = type.lowerType() ?: nothingType()