[NI] Bind all new resolved calls before update arguments.
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
42438bd363
commit
de17604fe7
+7
-2
@@ -71,6 +71,11 @@ class KotlinToResolvedCallTransformer(
|
||||
runCallCheckers(resolvedCall, callCheckerContext)
|
||||
}
|
||||
runLambdaArgumentsChecks(context, trace, baseResolvedCall.lambdaArguments)
|
||||
allResolvedCalls.map {
|
||||
if (it is VariableAsFunctionResolvedCall) it.functionCall else it
|
||||
}.forEach {
|
||||
runArgumentsChecks(context, trace, it as NewResolvedCallImpl<*>)
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
@@ -115,13 +120,13 @@ class KotlinToResolvedCallTransformer(
|
||||
|
||||
return when (completedCall) {
|
||||
is CompletedKotlinCall.Simple -> {
|
||||
NewResolvedCallImpl<D>(completedCall).runIfTraceNotNull(this::bindResolvedCall).runIfTraceNotNull(this::runArgumentsChecks)
|
||||
NewResolvedCallImpl<D>(completedCall).runIfTraceNotNull(this::bindResolvedCall)
|
||||
}
|
||||
is CompletedKotlinCall.VariableAsFunction -> {
|
||||
val resolvedCall = NewVariableAsFunctionResolvedCallImpl(
|
||||
completedCall,
|
||||
NewResolvedCallImpl(completedCall.variableCall),
|
||||
NewResolvedCallImpl<FunctionDescriptor>(completedCall.invokeCall).runIfTraceNotNull(this::runArgumentsChecks)
|
||||
NewResolvedCallImpl<FunctionDescriptor>(completedCall.invokeCall)
|
||||
).runIfTraceNotNull(this::bindResolvedCall)
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
Reference in New Issue
Block a user