From 4848f8e3da0d3258d7155e1946ea90bef8457cd2 Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Tue, 20 Jun 2017 15:54:07 +0300 Subject: [PATCH] [NI] Use correct type in TypeApproximator for Invariant projection --- .../src/org/jetbrains/kotlin/types/TypeApproximator.kt | 3 ++- 1 file changed, 2 insertions(+), 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 0160716f6e2..b6ba1793788 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/types/TypeApproximator.kt @@ -328,7 +328,8 @@ class TypeApproximator { // Inv is supertype for Inv if (!NewKotlinTypeChecker.equalTypes(argumentType, toSubType)) return type.defaultResult(toSuper) - newArguments[index] = argumentType.asTypeProjection() + // also Captured(out Nothing) = Nothing + newArguments[index] = toSubType.asTypeProjection() continue@loop }