diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/descriptors')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index 00e3239c..128b9bd4 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -500,14 +500,13 @@ private class DokkaDescriptorVisitor( .filter { it.kind == ClassKind.ENUM_ENTRY } .map { enumEntryDescriptor(it, parent) } - private fun DeclarationDescriptor.resolveDescriptorData(platformData: PlatformData?): PlatformDependent<DocumentationNode> { - val documentation = getDocumentation() - return if (documentation.children.isEmpty()) + private fun DeclarationDescriptor.resolveDescriptorData(platformData: PlatformData?): PlatformDependent<DocumentationNode> = getDocumentation().let { + if (it.children.isEmpty()) PlatformDependent.empty() else if (platformData != null) - PlatformDependent.from(platformData, documentation) + PlatformDependent.from(platformData, it) else - PlatformDependent.expectFrom(documentation) + PlatformDependent.expectFrom(it) } private fun ClassDescriptor.resolveClassDescriptionData(platformData: PlatformData?): ClassInfo { |