[NI] Bind all new resolved calls before update arguments.

This commit is contained in:
Stanislav Erokhin
2017-05-24 22:49:52 +03:00
committed by Mikhail Zarechenskiy
parent 42438bd363
commit de17604fe7
@@ -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")