aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/DocumentationBuilder.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Kotlin/DocumentationBuilder.kt')
-rw-r--r--src/Kotlin/DocumentationBuilder.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index 8b6b19d3..a9b017bb 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -210,9 +210,13 @@ class DocumentationBuilder(val session: ResolveSession, val options: Documentati
}
val node = DocumentationNode(this, kind)
node.appendSupertypes(this)
- if (getKind() != ClassKind.OBJECT) {
+ if (getKind() != ClassKind.OBJECT && getKind() != ClassKind.ENUM_ENTRY) {
node.appendChildren(getTypeConstructor().getParameters(), DocumentationReference.Kind.Detail)
- node.appendChildren(getConstructors(), DocumentationReference.Kind.Member)
+ val constructorsToDocument = if (getKind() == ClassKind.ENUM_CLASS)
+ getConstructors().filter { it.getValueParameters().size() > 0 }
+ else
+ getConstructors()
+ node.appendChildren(constructorsToDocument, DocumentationReference.Kind.Member)
}
node.appendChildren(getDefaultType().getMemberScope().getAllDescriptors(), DocumentationReference.Kind.Member)
val classObjectDescriptor = getClassObjectDescriptor()