diff --git a/native/commonizer/tests/org/jetbrains/kotlin/commonizer/hierarchical/ParameterizedTypesCommonizationTest.kt b/native/commonizer/tests/org/jetbrains/kotlin/commonizer/hierarchical/ParameterizedTypesCommonizationTest.kt index 203de31cf89..82e02656417 100644 --- a/native/commonizer/tests/org/jetbrains/kotlin/commonizer/hierarchical/ParameterizedTypesCommonizationTest.kt +++ b/native/commonizer/tests/org/jetbrains/kotlin/commonizer/hierarchical/ParameterizedTypesCommonizationTest.kt @@ -462,4 +462,66 @@ class ParameterizedTypesCommonizationTest : AbstractInlineSourcesCommonizationTe """.trimIndent() ) } + + @Suppress("unused") // https://youtrack.jetbrains.com/issue/KT-48850 + fun `KT-48850 - test non-commonizable type alias arguments - 0`() { + val result = commonize { + outputTarget("(a, b)") + + simpleSingleSourceTarget( + "a", """ + class Foo + typealias X = Foo + fun x(x: X) + """.trimIndent() + ) + + simpleSingleSourceTarget( + "b", """ + class Foo + typealias X = Foo + fun x(x: X) + """.trimIndent() + ) + } + + result.assertCommonized( + "(a, b)", """ + expect class Foo() + expect fun x(x: Foo) + """.trimIndent() + ) + } + + @Suppress("unused") // https://youtrack.jetbrains.com/issue/KT-48850 + fun `KT-48850 - test non-commonizable type alias arguments - 1`() { + val result = commonize { + outputTarget("(a, b)") + + simpleSingleSourceTarget( + "a", """ + class Foo + typealias X = Foo + typealias Y = X + fun x(x: Y) + """.trimIndent() + ) + + simpleSingleSourceTarget( + "b", """ + class Foo + typealias X = Foo + typealias Y = X + fun x(x: Y) + """.trimIndent() + ) + } + + result.assertCommonized( + "(a, b)", """ + expect class Foo() + expect fun x(x: Foo) + """.trimIndent() + ) + } }