From 8c2a79f39377892be44d752d0958efb9b83f1fce Mon Sep 17 00:00:00 2001 From: Vadim Mishenev Date: Wed, 8 Jun 2022 01:15:23 +0300 Subject: Support definitely non-nullable types (#2520) * Support definitely non-nullable types [Definitely non-nullable types](https://github.com/Kotlin/KEEP/blob/c72601cf35c1e95a541bb4b230edb474a6d1d1a8/proposals/definitely-non-nullable-types.md) are enabled since Kotlin 1.7 --- .../kotlin/transformers/documentables/ExtensionExtractorTransformer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/base/src/main/kotlin/transformers/documentables') diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt index 2a8baf0b..73023a86 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt @@ -9,7 +9,6 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.flowOn import kotlinx.coroutines.flow.toList -import org.jetbrains.dokka.base.signatures.KotlinSignatureUtils.driOrNull import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.links.DriOfAny import org.jetbrains.dokka.model.* @@ -91,6 +90,7 @@ private fun Callable.asPairsWithReceiverDRIs(): Sequence> = // care about it since there is nowhere to put documentation of given extension. private fun Callable.findReceiverDRIs(bound: Bound): Sequence = when (bound) { is Nullable -> findReceiverDRIs(bound.inner) + is DefinitelyNonNullable -> findReceiverDRIs(bound.inner) is TypeParameter -> if (this is DFunction && bound.dri == this.dri) generics.find { it.name == bound.name }?.bounds?.asSequence()?.flatMap(::findReceiverDRIs).orEmpty() -- cgit