aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-08-13 20:36:15 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-14 14:16:41 +0200
commit9623efd152c471ae36a7daf54e669b18db9976b3 (patch)
tree3e856874cac94eba183d6ca6eba7345fee6bd0c5 /plugins
parent892b92887ec3429833fac6378f8f93698945f897 (diff)
downloaddokka-9623efd152c471ae36a7daf54e669b18db9976b3.tar.gz
dokka-9623efd152c471ae36a7daf54e669b18db9976b3.tar.bz2
dokka-9623efd152c471ae36a7daf54e669b18db9976b3.zip
Fix bug with double Nullable wrapping
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index 84cd3793..c4c6483f 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -614,7 +614,7 @@ private class DokkaDescriptorVisitor(
private fun TypeProjection.toProjection(): Projection =
if (isStarProjection) Star else formPossiblyVariant()
- private fun TypeProjection.formPossiblyVariant(): Projection = type.fromPossiblyNullable().let {
+ private fun TypeProjection.formPossiblyVariant(): Projection = type.toBound().let {
when (projectionKind) {
org.jetbrains.kotlin.types.Variance.INVARIANT -> it
org.jetbrains.kotlin.types.Variance.IN_VARIANCE -> Variance(Variance.Kind.In, it)
@@ -622,9 +622,6 @@ private class DokkaDescriptorVisitor(
}
}
- private fun KotlinType.fromPossiblyNullable(): Bound =
- toBound().let { if (isMarkedNullable) Nullable(it) else it }
-
private fun DeclarationDescriptor.getDocumentation() = findKDoc().let {
MarkdownParser(resolutionFacade, this, logger).parseFromKDocTag(it)
}.takeIf { it.children.isNotEmpty() }