aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/transformers
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-08-12 14:26:45 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-17 11:55:35 +0200
commit785d741790f653d5c260f59c9d8875bbfde2dc07 (patch)
tree9c5bac1028d4ddeffb9101e1776563f1882d5ccb /plugins/base/src/main/kotlin/transformers
parent09004d828b5640b1471309f9e537ca64a28affd3 (diff)
downloaddokka-785d741790f653d5c260f59c9d8875bbfde2dc07.tar.gz
dokka-785d741790f653d5c260f59c9d8875bbfde2dc07.tar.bz2
dokka-785d741790f653d5c260f59c9d8875bbfde2dc07.zip
Fix generic supertypes to hold TypeParameters
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers')
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt2
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt
index 2da25d4b..6ce6e396 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/ExtensionExtractorTransformer.kt
@@ -90,7 +90,7 @@ private fun Callable.asPairsWithReceiverDRIs(): Sequence<Pair<DRI, Callable>> =
// care about it since there is nowhere to put documentation of given extension.
private fun Callable.findReceiverDRIs(bound: Bound): Sequence<DRI> = when (bound) {
is Nullable -> findReceiverDRIs(bound.inner)
- is OtherParameter ->
+ is TypeParameter ->
if (this is DFunction && bound.declarationDRI == this.dri)
generics.find { it.name == bound.name }?.bounds?.asSequence()?.flatMap(::findReceiverDRIs).orEmpty()
else
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt
index 85256d51..181113ae 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/InheritorsExtractorTransformer.kt
@@ -63,7 +63,7 @@ class InheritorsExtractorTransformer : DocumentableTransformer {
private fun <T : Documentable> T.toInheritanceEntries() =
(this as? WithSupertypes)?.let {
- it.supertypes.map { (k, v) -> k to v.map { it.dri to dri } }
+ it.supertypes.map { (k, v) -> k to v.map { it.typeConstructor.dri to dri } }
}.orEmpty()
}