Don't show parameter name hints when calling Java methods with unknown

parameter names

 #KT-17843 Fixed
This commit is contained in:
Dmitry Jemerov
2017-12-19 12:46:48 +01:00
parent 6d63dd9d83
commit 77c186442a
@@ -54,8 +54,13 @@ fun provideArgumentNameHints(element: KtCallElement): List<InlayInfo> {
}
private fun getParameterInfoForCallCandidate(resolvedCall: ResolvedCall<out CallableDescriptor>): List<InlayInfo> {
val resultingDescriptor = resolvedCall.resultingDescriptor
if (resultingDescriptor.hasSynthesizedParameterNames() && resultingDescriptor !is FunctionInvokeDescriptor) {
return emptyList()
}
return resolvedCall.valueArguments.mapNotNull { (valueParam: ValueParameterDescriptor, resolvedArg) ->
if (resolvedCall.resultingDescriptor is FunctionInvokeDescriptor &&
if (resultingDescriptor is FunctionInvokeDescriptor &&
valueParam.type.extractParameterNameFromFunctionTypeArgument() == null) {
return@mapNotNull null
}