[FIR] Fix CCE in postponed lambda resolution

This commit is contained in:
Dmitriy Novozhilov
2020-07-02 15:57:34 +03:00
parent 8311c1f0e2
commit 1429cba2d4
@@ -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)