From d8a3e7db72109c8f439095a924bdc1da47b6ab6a Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Wed, 9 Sep 2020 11:38:55 +0200 Subject: Add TypeAliased bound --- .../src/main/kotlin/converters/KotlinToJavaConverter.kt | 6 +++++- .../src/main/kotlin/signatures/JavaSignatureProvider.kt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/kotlin-as-java/src/main/kotlin') diff --git a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt index e0ac3c40..d79bd7b1 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt @@ -58,7 +58,8 @@ internal fun DPackage.asJava(): DPackage { return copy( functions = emptyList(), properties = emptyList(), - classlikes = classlikes.map { it.asJava() } + syntheticClasses + classlikes = classlikes.map { it.asJava() } + syntheticClasses, + typealiases = emptyList() ) } @@ -181,6 +182,9 @@ private fun Bound.asJava(): Bound = when (this) { is TypeConstructor -> copy( dri = dri.possiblyAsJava() ) + is TypeAliased -> copy( + inner = inner.asJava() + ) is Nullable -> copy( inner = inner.asJava() ) diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt index 121c4def..d24fa428 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt @@ -172,5 +172,6 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge is Void -> text("void") is PrimitiveJavaType -> text(p.name) is UnresolvedBound -> text(p.name) + is TypeAliased -> signatureForProjection(p.inner) } } -- cgit