[FE] Minor: rename ApplicableArgumentWithConstraint
This commit is contained in:
committed by
TeamCityServer
parent
aeaa7f71da
commit
fd7d000138
+3
-3
@@ -655,7 +655,7 @@ private fun ResolutionCandidate.prepareExpectedType(expectedType: UnwrappedType)
|
|||||||
return resolvedCall.knownParametersSubstitutor.safeSubstitute(resultType)
|
return resolvedCall.knownParametersSubstitutor.safeSubstitute(resultType)
|
||||||
}
|
}
|
||||||
|
|
||||||
private data class ApplicableArgumentWithConstraint(
|
private data class ApplicableContextReceiverArgumentWithConstraint(
|
||||||
val argument: SimpleKotlinCallArgument,
|
val argument: SimpleKotlinCallArgument,
|
||||||
val argumentType: UnwrappedType,
|
val argumentType: UnwrappedType,
|
||||||
val expectedType: UnwrappedType,
|
val expectedType: UnwrappedType,
|
||||||
@@ -665,14 +665,14 @@ private data class ApplicableArgumentWithConstraint(
|
|||||||
private fun ResolutionCandidate.getReceiverArgumentWithConstraintIfCompatible(
|
private fun ResolutionCandidate.getReceiverArgumentWithConstraintIfCompatible(
|
||||||
argument: SimpleKotlinCallArgument,
|
argument: SimpleKotlinCallArgument,
|
||||||
parameter: ParameterDescriptor
|
parameter: ParameterDescriptor
|
||||||
): ApplicableArgumentWithConstraint? {
|
): ApplicableContextReceiverArgumentWithConstraint? {
|
||||||
val csBuilder = getSystem().getBuilder()
|
val csBuilder = getSystem().getBuilder()
|
||||||
val expectedTypeUnprepared = argument.getExpectedType(parameter, callComponents.languageVersionSettings)
|
val expectedTypeUnprepared = argument.getExpectedType(parameter, callComponents.languageVersionSettings)
|
||||||
val expectedType = prepareExpectedType(expectedTypeUnprepared)
|
val expectedType = prepareExpectedType(expectedTypeUnprepared)
|
||||||
val argumentType = captureFromTypeParameterUpperBoundIfNeeded(argument.receiver.stableType, expectedType)
|
val argumentType = captureFromTypeParameterUpperBoundIfNeeded(argument.receiver.stableType, expectedType)
|
||||||
val position = ReceiverConstraintPositionImpl(argument)
|
val position = ReceiverConstraintPositionImpl(argument)
|
||||||
return if (csBuilder.isSubtypeConstraintCompatible(argumentType, expectedType, position))
|
return if (csBuilder.isSubtypeConstraintCompatible(argumentType, expectedType, position))
|
||||||
ApplicableArgumentWithConstraint(argument, argumentType, expectedType, position)
|
ApplicableContextReceiverArgumentWithConstraint(argument, argumentType, expectedType, position)
|
||||||
else null
|
else null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user