From 1429cba2d4247b228c29fdccc77176879c5fc77b Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Thu, 2 Jul 2020 15:57:34 +0300 Subject: [PATCH] [FIR] Fix CCE in postponed lambda resolution --- .../kotlin/fir/resolve/inference/ConstraintSystemCompleter.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/ConstraintSystemCompleter.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/ConstraintSystemCompleter.kt index 06d32466ee2..21e71da4cd5 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/ConstraintSystemCompleter.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/ConstraintSystemCompleter.kt @@ -134,12 +134,13 @@ class ConstraintSystemCompleter(private val components: BodyResolveComponents) { c, c.notFixedTypeVariables.getValue(variable.typeConstructor), TypeVariableDirectionCalculator.ResolveDirection.TO_SUPERTYPE - ) as ConeKotlinType).lowerBoundIfFlexible() as ConeClassLikeType + ) as ConeKotlinType).lowerBoundIfFlexible() val isExtensionWithoutParameters = false // TODO // functionalType.isExtensionFunctionType && functionalType.arguments.size == 2 && parameterTypes?.isEmpty() == true if (parameterTypes?.all { type -> type != null } == true && !isExtensionWithoutParameters) return this if (!functionalType.isSuitable()) return this + require(functionalType is ConeClassLikeType) val returnVariable = typeVariableCreator() csBuilder.registerVariable(returnVariable)