K1: rename 'kotlinCall' -> 'selectorCall' in relevant places

This commit is contained in:
Mikhail Glukhikh
2023-04-03 12:11:45 +02:00
committed by Space Team
parent bd27ec840c
commit d76b32daf2
5 changed files with 15 additions and 14 deletions
@@ -35,10 +35,11 @@ fun resolveKtPrimitive(
receiverInfo: ReceiverInfo,
convertedType: UnwrappedType?,
inferenceSession: InferenceSession?,
kotlinCall: KotlinCall? = null,
selectorCall: KotlinCall? = null,
): ResolvedAtom = when (argument) {
is SimpleKotlinCallArgument ->
checkSimpleArgument(csBuilder, argument, expectedType, diagnosticsHolder, receiverInfo, convertedType, inferenceSession, kotlinCall)
is SimpleKotlinCallArgument -> checkSimpleArgument(
csBuilder, argument, expectedType, diagnosticsHolder, receiverInfo, convertedType, inferenceSession, selectorCall
)
is LambdaKotlinCallArgument ->
preprocessLambdaArgument(csBuilder, argument, expectedType, diagnosticsHolder)
@@ -534,7 +534,7 @@ private fun ResolutionCandidate.resolveKotlinArgument(
receiverInfo,
convertedArgument?.unknownIntegerType?.unwrap(),
inferenceSession,
receiverInfo.selectorCall
selectorCall = receiverInfo.selectorCall
)
addResolvedKtPrimitive(resolvedAtom)
@@ -54,10 +54,10 @@ fun checkSimpleArgument(
receiverInfo: ReceiverInfo,
convertedType: UnwrappedType?,
inferenceSession: InferenceSession?,
kotlinCall: KotlinCall?
selectorCall: KotlinCall?
): ResolvedAtom = when (argument) {
is ExpressionKotlinCallArgument ->
checkExpressionArgument(csBuilder, argument, expectedType, diagnosticsHolder, receiverInfo.isReceiver, convertedType, kotlinCall)
checkExpressionArgument(csBuilder, argument, expectedType, diagnosticsHolder, receiverInfo.isReceiver, convertedType, selectorCall)
is SubKotlinCallArgument ->
checkSubCallArgument(csBuilder, argument, expectedType, diagnosticsHolder, receiverInfo, inferenceSession)
else ->
@@ -71,7 +71,7 @@ private fun checkExpressionArgument(
diagnosticsHolder: KotlinDiagnosticsHolder,
isReceiver: Boolean,
convertedType: UnwrappedType?,
kotlinCall: KotlinCall?
selectorCall: KotlinCall?
): ResolvedAtom {
val resolvedExpression = ResolvedExpressionAtom(expressionArgument)
if (expectedType == null) return resolvedExpression
@@ -100,7 +100,7 @@ private fun checkExpressionArgument(
}
val position =
if (isReceiver) ReceiverConstraintPositionImpl(expressionArgument, kotlinCall)
if (isReceiver) ReceiverConstraintPositionImpl(expressionArgument, selectorCall)
else ArgumentConstraintPositionImpl(expressionArgument)
// Used only for arguments with @NotNull annotation
@@ -41,7 +41,7 @@ class CallableReferenceConstraintPositionImpl(val callableReferenceCall: Callabl
class ReceiverConstraintPositionImpl(
argument: KotlinCallArgument,
val kotlinCall: KotlinCall?
val selectorCall: KotlinCall?
) : ReceiverConstraintPosition<KotlinCallArgument>(argument)
class FixVariableConstraintPositionImpl(