Added tests for parameter names in function type from SAM-adapter + fixed KT-13861
#KT-13861 Fixed
This commit is contained in:
+6
-1
@@ -355,7 +355,12 @@ abstract class KotlinParameterInfoWithCallHandlerBase<TArgumentList : KtElement,
|
||||
}
|
||||
|
||||
val candidates = callToUse.resolveCandidates(bindingContext, resolutionFacade)
|
||||
val resolvedCall = candidates.firstOrNull { descriptorsEqual(it.resultingDescriptor, overload) } ?: return null
|
||||
// First try to find strictly matching descriptor, then one with the same declaration.
|
||||
// The second way is needed for the case when the descriptor was invalidated and new one has been built.
|
||||
// See testLocalFunctionBug().
|
||||
val resolvedCall = candidates.singleOrNull { it.resultingDescriptor.original == overload.original }
|
||||
?: candidates.singleOrNull { descriptorsEqual(it.resultingDescriptor, overload) }
|
||||
?: return null
|
||||
val resultingDescriptor = resolvedCall.resultingDescriptor
|
||||
|
||||
fun argumentToParameter(argument: ValueArgument): ValueParameterDescriptor? {
|
||||
|
||||
Reference in New Issue
Block a user