diff options
Diffstat (limited to 'plugins/base')
2 files changed, 7 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index 17cd493a..642f991f 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -994,11 +994,11 @@ private class DokkaDescriptorVisitor( get() = ancestry.exceptionsInSupertypes() } - private fun Visibility.toDokkaVisibility(): org.jetbrains.dokka.model.Visibility = when (this) { - Visibilities.PUBLIC -> KotlinVisibility.Public - Visibilities.PROTECTED -> KotlinVisibility.Protected - Visibilities.INTERNAL -> KotlinVisibility.Internal - Visibilities.PRIVATE -> KotlinVisibility.Private + private fun DescriptorVisibility.toDokkaVisibility(): org.jetbrains.dokka.model.Visibility = when (this.delegate) { + Visibilities.Public -> KotlinVisibility.Public + Visibilities.Protected -> KotlinVisibility.Protected + Visibilities.Internal -> KotlinVisibility.Internal + Visibilities.Private -> KotlinVisibility.Private else -> KotlinVisibility.Public } diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt index bf7fbe7d..61af1db1 100644 --- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt @@ -38,6 +38,7 @@ import org.jetbrains.kotlin.builtins.functions.FunctionClassDescriptor import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys import org.jetbrains.kotlin.cli.jvm.config.JavaSourceRoot import org.jetbrains.kotlin.descriptors.Visibilities +import org.jetbrains.kotlin.descriptors.java.JavaVisibilities import org.jetbrains.kotlin.idea.caches.resolve.util.getJavaClassDescriptor import org.jetbrains.kotlin.idea.refactoring.fqName.getKotlinFqName import org.jetbrains.kotlin.load.java.JvmAbi @@ -185,7 +186,7 @@ class DefaultPsiToDocumentableTranslator( it.methods.forEach { method -> val hash = method.hash if (!method.isConstructor && !superMethodsKeys.contains(hash) && - method.getVisibility() != Visibilities.PRIVATE + method.getVisibility() != JavaVisibility.Private ) { superMethodsKeys.add(hash) superMethods.add(Pair(method, definedAt)) |