[NI] Use data flow info from arguments in parenthesis to resolve lambda
Fixes 'javaObjectType' and 'javaPrimitiveType'
This commit is contained in:
+6
-4
@@ -67,7 +67,7 @@ class KotlinResolutionCallbacksImpl(
|
||||
}
|
||||
|
||||
override fun analyzeAndGetLambdaResultArguments(
|
||||
topLevelCall: KotlinCall,
|
||||
outerCall: KotlinCall,
|
||||
lambdaArgument: LambdaKotlinCallArgument,
|
||||
isSuspend: Boolean,
|
||||
receiverType: UnwrappedType?,
|
||||
@@ -100,9 +100,11 @@ class KotlinResolutionCallbacksImpl(
|
||||
|
||||
val approximatesExpectedType = typeApproximator.approximateToSubType(expectedType, TypeApproximatorConfiguration.LocalDeclaration) ?: expectedType
|
||||
|
||||
val actualContext = outerCallContext.replaceBindingTrace(trace).
|
||||
replaceContextDependency(lambdaInfo.contextDependency).replaceExpectedType(approximatesExpectedType)
|
||||
|
||||
val actualContext = outerCallContext
|
||||
.replaceBindingTrace(trace)
|
||||
.replaceContextDependency(lambdaInfo.contextDependency)
|
||||
.replaceExpectedType(approximatesExpectedType)
|
||||
.replaceDataFlowInfo(outerCall.psiKotlinCall.resultDataFlowInfo)
|
||||
|
||||
val functionTypeInfo = expressionTypingServices.getTypeInfo(expression, actualContext)
|
||||
trace.record(BindingContext.NEW_INFERENCE_LAMBDA_INFO, ktFunction, LambdaInfo.STUB_EMPTY)
|
||||
|
||||
Reference in New Issue
Block a user