diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-09-09 11:38:55 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-09-10 13:11:02 +0200 |
commit | d8a3e7db72109c8f439095a924bdc1da47b6ab6a (patch) | |
tree | 28e541fe952ae42519aabdbd990918673664684d /plugins/base/src/main/kotlin/signatures | |
parent | f1bc6e87722085363b10d559696d27071e7e1745 (diff) | |
download | dokka-d8a3e7db72109c8f439095a924bdc1da47b6ab6a.tar.gz dokka-d8a3e7db72109c8f439095a924bdc1da47b6ab6a.tar.bz2 dokka-d8a3e7db72109c8f439095a924bdc1da47b6ab6a.zip |
Add TypeAliased bound
Diffstat (limited to 'plugins/base/src/main/kotlin/signatures')
-rw-r--r-- | plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt | 2 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt index be9543f4..2a091ff5 100644 --- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt +++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt @@ -345,6 +345,8 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog text("?") } + is TypeAliased -> signatureForProjection(p.typeAlias) + is JavaObject -> link("Any", DriOfAny) is Void -> link("Unit", DriOfUnit) is PrimitiveJavaType -> signatureForProjection(p.translateToKotlin(), showFullyQualifiedName) diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt index c40c48a2..2266b691 100644 --- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt +++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureUtils.kt @@ -35,14 +35,15 @@ object KotlinSignatureUtils : JvmSignatureUtils { val Bound.driOrNull: DRI? get() { return when (this) { - is TypeParameter -> this.dri - is TypeConstructor -> this.dri - is Nullable -> this.inner.driOrNull - is PrimitiveJavaType -> this.dri + is TypeParameter -> dri + is TypeConstructor -> dri + is Nullable -> inner.driOrNull + is PrimitiveJavaType -> dri is Void -> DriOfUnit is JavaObject -> DriOfAny is Dynamic -> null is UnresolvedBound -> null + is TypeAliased -> typeAlias.driOrNull } } @@ -57,6 +58,7 @@ object KotlinSignatureUtils : JvmSignatureUtils { is UnresolvedBound -> emptyList() is Variance<*> -> inner.drisOfAllNestedBounds is Star -> emptyList() + is TypeAliased -> listOfNotNull(typeAlias.driOrNull, inner.driOrNull) } } |