aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/translators/descriptors
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-08-27 13:45:27 +0200
committerMarcin Aman <marcin.aman@gmail.com>2021-08-27 13:45:27 +0200
commit459a0005824de412ff7d4472c1eb4d6fb7c2a7cc (patch)
tree0ccdbf1d2b5b7e3ad54f70df9284d63a29f058f5 /plugins/base/src/main/kotlin/translators/descriptors
parent8e1848edfa24acb6b12fad067a6cedbb7be0426b (diff)
downloaddokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.tar.gz
dokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.tar.bz2
dokka-459a0005824de412ff7d4472c1eb4d6fb7c2a7cc.zip
Restore language level to 1.4
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/descriptors')
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index 88dde911..0cd99f08 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -62,6 +62,7 @@ import org.jetbrains.kotlin.resolve.source.PsiSourceFile
import org.jetbrains.kotlin.types.*
import org.jetbrains.kotlin.types.typeUtil.immediateSupertypes
import org.jetbrains.kotlin.types.typeUtil.isAnyOrNullableAny
+import org.jetbrains.kotlin.util.firstNotNullResult
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
import java.nio.file.Paths
@@ -891,7 +892,8 @@ private class DokkaDescriptorVisitor(
private fun DeclarationDescriptor.getJavaDocs() = (this as? CallableDescriptor)
?.overriddenDescriptors
?.mapNotNull { it.findPsi() as? PsiNamedElement }
- ?.firstNotNullOfOrNull { javadocParser.parseDocumentation(it) }
+ ?.firstOrNull()
+ ?.let { javadocParser.parseDocumentation(it) }
private suspend fun ClassDescriptor.companion(dri: DRIWithPlatformInfo): DObject? = companionObjectDescriptor?.let {
objectDescriptor(it, dri)