Refactoring: rename method to make it more specific
This commit is contained in:
+2
-2
@@ -214,7 +214,7 @@ class CallableReferencesCandidateFactory(
|
||||
callComponents.builtIns
|
||||
)
|
||||
|
||||
if (needCompatibilityWarning(callableReferenceAdaptation, candidateDescriptor)) {
|
||||
if (needCompatibilityResolveForCallableReference(callableReferenceAdaptation, candidateDescriptor)) {
|
||||
diagnostics.add(LowerPriorityToPreserveCompatibility)
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ class CallableReferencesCandidateFactory(
|
||||
)
|
||||
}
|
||||
|
||||
private fun needCompatibilityWarning(
|
||||
private fun needCompatibilityResolveForCallableReference(
|
||||
callableReferenceAdaptation: CallableReferenceAdaptation?,
|
||||
candidate: CallableDescriptor
|
||||
): Boolean {
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ object SamTypeConversions : ParameterTypeConversion {
|
||||
SamConversionDescription(convertedTypeByOriginal, convertedTypeByCandidate!!)
|
||||
)
|
||||
|
||||
if (needCompatibilityResolve(candidate, expectedParameterType)) {
|
||||
if (needCompatibilityResolveForSAM(candidate, expectedParameterType)) {
|
||||
candidate.addDiagnostic(LowerPriorityToPreserveCompatibility)
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ object SamTypeConversions : ParameterTypeConversion {
|
||||
return convertedTypeByCandidate
|
||||
}
|
||||
|
||||
private fun needCompatibilityResolve(candidate: KotlinResolutionCandidate, typeToConvert: UnwrappedType): Boolean {
|
||||
private fun needCompatibilityResolveForSAM(candidate: KotlinResolutionCandidate, typeToConvert: UnwrappedType): Boolean {
|
||||
// fun interfaces is a new feature with a new modifier, so no compatibility resolve is needed
|
||||
val descriptor = typeToConvert.constructor.declarationDescriptor
|
||||
if (descriptor is ClassDescriptor && descriptor.isFun) return false
|
||||
|
||||
Reference in New Issue
Block a user