diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-08-25 14:51:53 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-27 17:35:04 +0200 |
commit | b05eb93d345cccd0cae9393f99acd428012d1106 (patch) | |
tree | e5bbc7ec75b5b5034c3d6b3e7c9690a510150264 /plugins/base/src/main/kotlin/signatures | |
parent | 1c6dabaee7764954a9783effa7463f9866a02066 (diff) | |
download | dokka-b05eb93d345cccd0cae9393f99acd428012d1106.tar.gz dokka-b05eb93d345cccd0cae9393f99acd428012d1106.tar.bz2 dokka-b05eb93d345cccd0cae9393f99acd428012d1106.zip |
Add handling for generic type parameters variance
Diffstat (limited to 'plugins/base/src/main/kotlin/signatures')
-rw-r--r-- | plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt | 6 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt index 82eeb296..d6beb474 100644 --- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt +++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt @@ -295,7 +295,7 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog private fun signature(t: DTypeParameter) = t.sourceSets.map { contentBuilder.contentFor(t, styles = t.stylesIfDeprecated(it), sourceSets = setOf(it)) { - link(t.name, t.dri.withTargetToDeclaration()) + signatureForProjection(t.variantTypeParameter.withNewDri(t.dri.withTargetToDeclaration())) list(t.nontrivialBounds, prefix = " : ") { bound -> signatureForProjection(bound) } @@ -333,8 +333,8 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog } } - is Variance -> group(styles = emptySet()) { - text(p.kind.toString() + " ") + is Variance<*> -> group(styles = emptySet()) { + text("$p ".takeIf { it.isNotBlank() } ?: "") signatureForProjection(p.inner, showFullyQualifiedName) } diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt index e8107177..c40c48a2 100644 --- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt +++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt @@ -55,7 +55,7 @@ object KotlinSignatureUtils : JvmSignatureUtils { is JavaObject -> listOf(DriOfAny) is Dynamic -> emptyList() is UnresolvedBound -> emptyList() - is Variance -> inner.drisOfAllNestedBounds + is Variance<*> -> inner.drisOfAllNestedBounds is Star -> emptyList() } |