From 80d8991fc572bd145e873ae368dca0b201e069cf Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 3 Dec 2020 11:28:59 +0100 Subject: Bump compiler to 1.4.20, IJ to 201 and coroutines to 1.4.1 (#1641) --- .../descriptors/DefaultDescriptorToDocumentableTranslator.kt | 10 +++++----- .../translators/psi/DefaultPsiToDocumentableTranslator.kt | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins/base/src/main') 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)) -- cgit