aboutsummaryrefslogtreecommitdiff
path: root/src/DocumentationBuildingVisitor.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/DocumentationBuildingVisitor.kt')
-rw-r--r--src/DocumentationBuildingVisitor.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/DocumentationBuildingVisitor.kt b/src/DocumentationBuildingVisitor.kt
index 4f76ed0e..31c126fc 100644
--- a/src/DocumentationBuildingVisitor.kt
+++ b/src/DocumentationBuildingVisitor.kt
@@ -66,9 +66,12 @@ class DocumentationBuildingVisitor(private val worker: DeclarationDescriptorVisi
public override fun visitClassDescriptor(descriptor: ClassDescriptor?, data: DocumentationNode?): DocumentationNode? {
val node = createDocumentation(descriptor!!, data!!)
- visitChildren(descriptor.getConstructors(), node)
- visitChildren(descriptor.getTypeConstructor().getParameters(), node)
- visitChild(descriptor.getClassObjectDescriptor(), node)
+ if (descriptor.getKind() != ClassKind.OBJECT) {
+ // do not go inside object for class object and constructors, they are generated
+ visitChildren(descriptor.getTypeConstructor().getParameters(), node)
+ visitChildren(descriptor.getConstructors(), node)
+ visitChild(descriptor.getClassObjectDescriptor(), node)
+ }
val members = descriptor.getDefaultType().getMemberScope().getAllDescriptors().filter {
it !is CallableMemberDescriptor || it.isUserCode()
}