[NI] Redo how we take care of postpone arguments
The main change here is the following: before callable reference resolution starts directly after choosing candidate. Since now we start resolution before call completion.
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
b344865c15
commit
ab2f99542a
+2
-2
@@ -156,7 +156,7 @@ class KotlinResolutionCallbacksImpl(
|
||||
}
|
||||
|
||||
override fun completeCallableReference(
|
||||
callableReferenceArgument: ResolvedCallableReferenceArgument,
|
||||
callableReferenceArgument: PostponedCallableReferenceArgument,
|
||||
resultTypeParameters: List<UnwrappedType>
|
||||
) {
|
||||
val callableCandidate = callableReferenceArgument.callableResolutionCandidate
|
||||
@@ -208,7 +208,7 @@ class KotlinResolutionCallbacksImpl(
|
||||
doubleColonExpressionResolver.checkReferenceIsToAllowedMember(callableCandidate.candidate, topLevelCallContext.trace, callableReferenceExpression)
|
||||
}
|
||||
|
||||
override fun completeCollectionLiteralCalls(collectionLiteralArgument: ResolvedCollectionLiteralArgument) {
|
||||
override fun completeCollectionLiteralCalls(collectionLiteralArgument: PostponedCollectionLiteralArgument) {
|
||||
val psiCallArgument = collectionLiteralArgument.argument.psiCallArgument as CollectionLiteralKotlinCallArgumentImpl
|
||||
val context = psiCallArgument.outerCallContext
|
||||
|
||||
|
||||
+2
-2
@@ -160,7 +160,7 @@ class KotlinToResolvedCallTransformer(
|
||||
private fun runLambdaArgumentsChecks(
|
||||
context: BasicCallResolutionContext,
|
||||
trace: BindingTrace,
|
||||
lambdaArguments: List<ResolvedLambdaArgument>
|
||||
lambdaArguments: List<PostponedLambdaArgument>
|
||||
) {
|
||||
for (lambdaArgument in lambdaArguments) {
|
||||
val returnType = lambdaArgument.finalReturnType
|
||||
@@ -180,7 +180,7 @@ class KotlinToResolvedCallTransformer(
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateTraceForLambdaReturnType(lambdaArgument: ResolvedLambdaArgument, trace: BindingTrace, returnType: UnwrappedType) {
|
||||
private fun updateTraceForLambdaReturnType(lambdaArgument: PostponedLambdaArgument, trace: BindingTrace, returnType: UnwrappedType) {
|
||||
val psiCallArgument = lambdaArgument.argument.psiCallArgument
|
||||
|
||||
val ktArgumentExpression: KtExpression
|
||||
|
||||
Reference in New Issue
Block a user