aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-08-13 20:35:50 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-14 14:16:41 +0200
commit892b92887ec3429833fac6378f8f93698945f897 (patch)
treecc492751c7065d615e37ccae6b1d4b4db5fca829 /plugins
parent0a2a5896ece71f9d37930274c86b09a5fdf38644 (diff)
downloaddokka-892b92887ec3429833fac6378f8f93698945f897.tar.gz
dokka-892b92887ec3429833fac6378f8f93698945f897.tar.bz2
dokka-892b92887ec3429833fac6378f8f93698945f897.zip
Omit trivial bound
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
index 8341fabd..88879d81 100644
--- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
+++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
@@ -155,7 +155,7 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
}
link(c.name!!, c.dri)
if (c is WithGenerics) {
- list(c.generics, prefix = "<", suffix = "> ") {
+ list(c.generics, prefix = "<", suffix = ">") {
+buildSignature(it)
}
}
@@ -292,8 +292,8 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
t.sourceSets.map {
contentBuilder.contentFor(t, styles = t.stylesIfDeprecated(it), sourceSets = setOf(it)) {
link(t.name, t.dri.withTargetToDeclaration())
- list(t.bounds, prefix = " : ") {
- signatureForProjection(it)
+ list(t.nontrivialBounds, prefix = " : ") { bound ->
+ signatureForProjection(bound)
}
}
}
@@ -375,6 +375,9 @@ private fun PrimitiveJavaType.translateToKotlin() = TypeConstructor(
projections = emptyList()
)
+private val DTypeParameter.nontrivialBounds: List<Bound>
+ get() = bounds.filterNot { it is Nullable && it.inner.driOrNull == DriOfAny }
+
val TypeConstructor.function
get() = modifier == FunctionModifiers.FUNCTION || modifier == FunctionModifiers.EXTENSION