[NI] Substitute lambda return type with current substitutor
We should do this because return type even it still not proper can contain fixed type variables
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
89ac3bd5cf
commit
30f7396803
+1
-13
@@ -257,20 +257,8 @@ class KotlinCallCompleter(
|
||||
|
||||
for (innerCall in lambda.resultArguments) {
|
||||
// todo strange code -- why top-level kotlinCall? may be it isn't right outer call
|
||||
CheckArguments.checkArgument(topLevelCallContext, topLevelCall, c.getBuilder(), innerCall, lambda.returnType)
|
||||
CheckArguments.checkArgument(topLevelCallContext, topLevelCall, c.getBuilder(), innerCall, lambda.returnType.let(::substitute))
|
||||
}
|
||||
// when (innerCall) {
|
||||
// is ResolvedKotlinCall.CompletedResolvedKotlinCall -> {
|
||||
// val returnType = innerCall.completedCall.lastCall.resultingDescriptor.returnTypeOrNothing
|
||||
// constraintInjector.addInitialSubtypeConstraint(injectorContext, returnType, lambda.returnType, position)
|
||||
// }
|
||||
// is ResolvedKotlinCall.OnlyResolvedKotlinCall -> {
|
||||
// // todo register call
|
||||
// val returnType = innerCall.candidate.lastCall.descriptorWithFreshTypes.returnTypeOrNothing
|
||||
// c.addInnerCall(innerCall)
|
||||
// constraintInjector.addInitialSubtypeConstraint(injectorContext, returnType, lambda.returnType, position)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
private fun canWeAnalyzeIt(c: Context, lambda: ResolvedLambdaArgument): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user