From 9623efd152c471ae36a7daf54e669b18db9976b3 Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Thu, 13 Aug 2020 20:36:15 +0200 Subject: Fix bug with double Nullable wrapping --- .../descriptors/DefaultDescriptorToDocumentableTranslator.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'plugins/base') 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() } -- cgit