From a5434ae0141ac1a3d150f76937b0456ad15030e0 Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Wed, 9 Sep 2020 15:42:35 +0200 Subject: Fix showing fully qualified name for typealiases with clashing names --- .../content/signatures/ContentForSignaturesTest.kt | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'plugins/base/src/test/kotlin/content/signatures') 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") } } } -- cgit