Use intersection of star projection type-param bounds instead of type

This commit is contained in:
Simon Ogorodnik
2019-04-30 17:13:41 +03:00
committed by Mikhail Glukhikh
parent b48e0a89c5
commit 88a9349f32
@@ -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()