diff options
author | Linnea Gräf <nea@nea.moe> | 2023-11-23 16:26:21 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2023-11-23 16:26:21 +0100 |
commit | 36ac5bfe78e581d4a2f4877c71543c097ebe4993 (patch) | |
tree | e7f2730f315dcf9f05209151abd1745f1d0224ee | |
parent | b3789633e95d39bca20e1c545114325eee2cab4d (diff) | |
download | dokka-36ac5bfe78e581d4a2f4877c71543c097ebe4993.tar.gz dokka-36ac5bfe78e581d4a2f4877c71543c097ebe4993.tar.bz2 dokka-36ac5bfe78e581d4a2f4877c71543c097ebe4993.zip |
Add package declaration descriptor to DRI conversionfix-package-links
-rw-r--r-- | dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt index e2deaa8c..7d6bbc7c 100644 --- a/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt +++ b/dokka-subprojects/analysis-kotlin-descriptors-compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/DRIFactory.kt @@ -13,6 +13,11 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.parentsWithSelf import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull internal fun DRI.Companion.from(descriptor: DeclarationDescriptor) = descriptor.parentsWithSelf.run { + if (descriptor is PackageViewDescriptor) { + return@run DRI( + packageName = descriptor.fqName.asString() + ) + } val parameter = firstIsInstanceOrNull<ValueParameterDescriptor>() val callable = parameter?.containingDeclaration ?: firstIsInstanceOrNull<CallableDescriptor>() |