From a0234241f58b4816a758ee4ec34e6f4378b6c0ba Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Sun, 26 May 2019 21:41:53 +0300 Subject: [PATCH] [NI] Approximate components of raw types separately This is needed as components can have different type arguments --- .../src/org/jetbrains/kotlin/types/TypeApproximator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt b/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt index 129d5915fb1..7312968dd10 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt @@ -194,7 +194,7 @@ abstract class AbstractTypeApproximator(val ctx: TypeSystemInferenceExtensionCon val lowerResult = approximateTo(lowerBound, conf, depth) - val upperResult = if (lowerBound.typeConstructor() == upperBound.typeConstructor()) + val upperResult = if (type !is RawTypeMarker && lowerBound.typeConstructor() == upperBound.typeConstructor()) lowerResult?.withNullability(upperBound.isMarkedNullable()) else approximateTo(upperBound, conf, depth)