KT-20884: Support receiver reference in KDoc comments
#KT-20884 fixed
This commit is contained in:
@@ -119,6 +119,10 @@ private fun resolveDefaultKDocLink(
|
||||
descriptorsByName.addAll(contextScope.collectFunctions(shortName, NoLookupLocation.FROM_IDE))
|
||||
descriptorsByName.addAll(contextScope.collectVariables(shortName, NoLookupLocation.FROM_IDE))
|
||||
|
||||
if (fromDescriptor is FunctionDescriptor && fromDescriptor.isExtension && shortName.asString() == "this") {
|
||||
return listOfNotNull(fromDescriptor.extensionReceiverParameter)
|
||||
}
|
||||
|
||||
// Try to find a matching local descriptor (parameter or type parameter) first
|
||||
val localDescriptors = descriptorsByName.filter { it.containingDeclaration == fromDescriptor }
|
||||
if (localDescriptors.isNotEmpty()) return localDescriptors
|
||||
|
||||
Reference in New Issue
Block a user