aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src')
-rw-r--r--plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt4
-rw-r--r--plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt24
2 files changed, 24 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
index 08e702ba..324ef303 100644
--- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
+++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
@@ -307,9 +307,7 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
) {
signatureForProjection(
p = bound,
- showFullyQualifiedName =
- bound.driOrNull?.packageName != typeAlias.dri.packageName &&
- bound.driOrNull?.packageName != "kotlin"
+ showFullyQualifiedName = bound.driOrNull?.classNames == typeAlias.dri.classNames
)
}
diff --git a/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt b/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt
index cabe822d..908109bf 100644
--- a/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt
+++ b/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt
@@ -448,7 +448,29 @@ class ContentForSignaturesTest : AbstractCoreTest() {
pagesTransformationStage = { module ->
val page = module.children.single { it.name == "test" } as PackagePageNode
page.content.assertNode {
- typealiasSignature("Alias", "other.X")
+ typealiasSignature("Alias", "X")
+ }
+ }
+ }
+ }
+
+ @Test
+ fun `typealias to type in different package with same name`() {
+ testInline(
+ """
+ |/src/main/kotlin/test/source.kt
+ |package test
+ |typealias Alias = other.Alias
+ |
+ |/src/main/kotlin/test/source2.kt
+ |package other
+ |class Alias
+ """.trimIndent(), testConfiguration
+ ) {
+ pagesTransformationStage = { module ->
+ val page = module.children.single { it.name == "test" } as PackagePageNode
+ page.content.assertNode {
+ typealiasSignature("Alias", "other.Alias")
}
}
}