Fix inference for lambdas with with extension function expected type

^KT-49832 Fixed
^KT-49836 Fixed
This commit is contained in:
Denis.Zharkov
2021-11-23 10:25:07 +03:00
committed by teamcityserver
parent 3fb17cfa9a
commit 0d9ad62d4a
16 changed files with 320 additions and 16 deletions
@@ -83,6 +83,12 @@ class ClassicConstraintSystemUtilContext(
return atom is FunctionExpression && atom.receiverType != null
}
override fun PostponedAtomWithRevisableExpectedType.isLambda(): Boolean {
require(this is ResolvedAtom)
val atom = this.atom
return atom is LambdaKotlinCallArgument && atom !is FunctionExpression
}
override fun createTypeVariableForLambdaReturnType(): TypeVariableMarker {
return TypeVariableForLambdaReturnType(
builtIns,