aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kotlin-as-java')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt2
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt6
2 files changed, 4 insertions, 4 deletions
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 58c62622..f169f89a 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt
@@ -172,7 +172,7 @@ internal fun DClass.asJava(): DClass = copy(
)
private fun DTypeParameter.asJava(): DTypeParameter = copy(
- dri = dri.possiblyAsJava(),
+ variantTypeParameter = variantTypeParameter.withNewDri(dri.possiblyAsJava()),
bounds = bounds.map { it.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 5134bd4d..d9b9dc5b 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -141,7 +141,7 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
private fun signature(t: DTypeParameter) =
t.sourceSets.map {
contentBuilder.contentFor(t, styles = t.stylesIfDeprecated(it), sourceSets = setOf(it)) {
- text(t.name.substringAfterLast("."))
+ text(t.name.substringAfterLast(".")) // Investigate if java classes can be somehow variant
list(t.bounds, prefix = " extends ") {
signatureForProjection(it)
}
@@ -159,8 +159,8 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
}
}
- is Variance -> group(styles = emptySet()) {
- text(p.kind.toString() + " ") // TODO: "super" && "extends"
+ is Variance<*> -> group(styles = emptySet()) {
+ text("$p ".takeIf { it.isNotBlank() } ?: "") // TODO: "super" && "extends"
signatureForProjection(p.inner)
}