aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
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/signatures/KotlinSignatureProvider.kt
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/signatures/KotlinSignatureProvider.kt')
-rw-r--r--plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
index 88879d81..bed8386d 100644
--- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
+++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
@@ -15,6 +15,7 @@ import org.jetbrains.dokka.pages.ContentKind
import org.jetbrains.dokka.pages.ContentNode
import org.jetbrains.dokka.pages.TextStyle
import org.jetbrains.dokka.utilities.DokkaLogger
+import java.lang.IllegalStateException
import kotlin.text.Typography.nbsp
class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogger) : SignatureProvider,
@@ -182,9 +183,14 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
}
}
if (c is WithSupertypes) {
- c.supertypes.filter { it.key == sourceSet }.map { (s, dris) ->
- list(dris, prefix = " : ", sourceSets = setOf(s)) {
- link(it.dri.sureClassNames, it.dri, sourceSets = setOf(s))
+ c.supertypes.filter { it.key == sourceSet }.map { (s, typeConstructors) ->
+ list(typeConstructors, prefix = " : ", sourceSets = setOf(s)) {
+ link(it.typeConstructor.dri.sureClassNames, it.typeConstructor.dri, sourceSets = setOf(s))
+ if ( it.typeConstructor.projections.isNotEmpty() ) {
+ list(it.typeConstructor.projections, prefix = "<", suffix = "> ") {
+ signatureForProjection(it)
+ }
+ }
}
}
}
@@ -313,7 +319,7 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
p: Projection, showFullyQualifiedName: Boolean = false
): Unit =
when (p) {
- is OtherParameter -> link(p.name, p.declarationDRI)
+ is TypeParameter -> link(p.name, p.declarationDRI)
is TypeConstructor -> if (p.function)
+funType(mainDRI.single(), mainSourcesetData, p)