aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2021-03-04 15:59:35 +0100
committerGitHub <noreply@github.com>2021-03-04 15:59:35 +0100
commit2717e8505a41e188d209b81a3150a16c64ca7239 (patch)
tree7b527a145b086e92f4fdcc3d4e786f478014f12f /plugins/base/src/main
parent69dc33255c2cd1cb77b74325c89bc6a3ba34c6fa (diff)
downloaddokka-2717e8505a41e188d209b81a3150a16c64ca7239.tar.gz
dokka-2717e8505a41e188d209b81a3150a16c64ca7239.tar.bz2
dokka-2717e8505a41e188d209b81a3150a16c64ca7239.zip
Obvious functions should also work for interfaces (#1763)
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index bc45337a..ed5b8c86 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -493,7 +493,7 @@ private class DokkaDescriptorVisitor(
descriptor.additionalExtras().toSourceSetDependent().toAdditionalModifiers(),
(descriptor.getAnnotations() + descriptor.fileLevelAnnotations()).toSourceSetDependent()
.toAnnotations(),
- ObviousMember.takeIf { descriptor.isFake },
+ ObviousMember.takeIf { descriptor.isObvious },
)
)
}
@@ -1038,8 +1038,11 @@ private class DokkaDescriptorVisitor(
?.parallelMap { it.toAnnotation(scope = Annotations.AnnotationScope.FILE) }
.orEmpty()
- private val FunctionDescriptor.isFake: Boolean
- get() = kind == CallableMemberDescriptor.Kind.FAKE_OVERRIDE || kind == CallableMemberDescriptor.Kind.SYNTHESIZED
+ private val FunctionDescriptor.isObvious: Boolean
+ get() = kind == CallableMemberDescriptor.Kind.FAKE_OVERRIDE ||
+ kind == CallableMemberDescriptor.Kind.SYNTHESIZED ||
+ containingDeclaration.fqNameOrNull()?.asString()
+ ?.let { it == "kotlin.Any" || it == "kotlin.Enum" } == true
}
private data class AncestryLevel(