aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/DokkaDescriptorVisitor.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/kotlin/DokkaDescriptorVisitor.kt b/core/src/main/kotlin/DokkaDescriptorVisitor.kt
index 01c6959e..5dad3702 100644
--- a/core/src/main/kotlin/DokkaDescriptorVisitor.kt
+++ b/core/src/main/kotlin/DokkaDescriptorVisitor.kt
@@ -11,6 +11,8 @@ import org.jetbrains.kotlin.resolve.calls.tower.isSynthesized
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
import org.jetbrains.kotlin.resolve.scopes.MemberScope
import org.jetbrains.kotlin.idea.kdoc.findKDoc
+import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
+import org.jetbrains.kotlin.resolve.descriptorUtil.overriddenTreeUniqueAsSequence
object DokkaDescriptorVisitor : DeclarationDescriptorVisitorEmptyBodies<DocumentationNode<*>, DRI>() {
override fun visitDeclarationDescriptor(descriptor: DeclarationDescriptor, parent: DRI): Nothing {
@@ -102,7 +104,10 @@ object DokkaDescriptorVisitor : DeclarationDescriptorVisitorEmptyBodies<Document
private fun MemberScope.functions(parent: DRI): List<Function> =
getContributedDescriptors(DescriptorKindFilter.FUNCTIONS) { true }
.filterIsInstance<FunctionDescriptor>()
- .filterNot { it.isSynthesized }
+ .filterNot {
+ it.overriddenTreeUniqueAsSequence(false).last().containingDeclaration.fqNameSafe.asString() == Any::class.qualifiedName &&
+ it.findKDoc() == null
+ }
.map { visitFunctionDescriptor(it, parent) }
private fun MemberScope.properties(parent: DRI): List<Property> =