From 0f0d834c23b01f91fba7581af26ff1107236a5c4 Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Mon, 22 May 2017 20:10:18 +0300 Subject: [PATCH] [NI] Minor. Fix IOE. --- .../src/org/jetbrains/kotlin/types/checker/NewCapturedType.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/checker/NewCapturedType.kt b/core/descriptors/src/org/jetbrains/kotlin/types/checker/NewCapturedType.kt index eac6c2c1fb3..a7f6ae799a0 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/checker/NewCapturedType.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/checker/NewCapturedType.kt @@ -70,6 +70,8 @@ fun captureFromArguments( status: CaptureStatus, acceptNewCapturedType: ((argumentIndex: Int, NewCapturedType) -> Unit) = DO_NOTHING_2 ): SimpleType? { + if (type.arguments.size != type.constructor.parameters.size) return null + val arguments = type.arguments if (arguments.all { it.projectionKind == Variance.INVARIANT }) return null