[Test] Add test for expect nested classes unwrapping

...in type arguments, when they were actualized via
typealias.

^KT-31636
This commit is contained in:
Roman Efremov
2023-11-27 15:40:29 +01:00
committed by Space Team
parent 4aaf290c99
commit cec644e9db
8 changed files with 81 additions and 0 deletions
@@ -23976,6 +23976,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealias.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasExpandInTypeParam.kt")
public void testNestedClassViaActualTypealiasExpandInTypeParam() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealiasExpandInTypeParam.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasWithTypeParam.kt")
public void testNestedClassViaActualTypealiasWithTypeParam() throws Exception {
@@ -23976,6 +23976,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealias.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasExpandInTypeParam.kt")
public void testNestedClassViaActualTypealiasExpandInTypeParam() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealiasExpandInTypeParam.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasWithTypeParam.kt")
public void testNestedClassViaActualTypealiasWithTypeParam() throws Exception {
@@ -337,6 +337,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealias.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasExpandInTypeParam.kt")
public void testNestedClassViaActualTypealiasExpandInTypeParam() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealiasExpandInTypeParam.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasWithTypeParam.kt")
public void testNestedClassViaActualTypealiasWithTypeParam() throws Exception {
@@ -337,6 +337,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealias.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasExpandInTypeParam.kt")
public void testNestedClassViaActualTypealiasExpandInTypeParam() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealiasExpandInTypeParam.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasWithTypeParam.kt")
public void testNestedClassViaActualTypealiasWithTypeParam() throws Exception {
@@ -0,0 +1,17 @@
// MODULE: m1-common
// FILE: common.kt
<!EXPECT_ACTUAL_INCOMPATIBILITY{JVM}!>expect class Foo {
<!EXPECT_ACTUAL_INCOMPATIBILITY{JVM}!>class Inner {
<!EXPECT_ACTUAL_MISMATCH{JVM}!>fun foo(p: List<Inner>)<!>
}<!>
}<!>
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
class FooImpl {
class Inner {
fun foo(p: List<Inner>) {}
}
}
actual typealias <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>Foo<!> = FooImpl
@@ -0,0 +1,17 @@
// MODULE: m1-common
// FILE: common.kt
expect class Foo {
class Inner {
fun foo(p: List<Inner>)
}
}
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
class FooImpl {
class Inner {
fun foo(p: List<Inner>) {}
}
}
actual typealias <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>Foo<!> = FooImpl
@@ -0,0 +1,17 @@
// MODULE: m1-common
// FILE: common.kt
expect class Foo {
class Inner {
fun foo(p: List<Inner>)
}
}
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
class FooImpl {
class Inner {
fun foo(p: List<Inner>) {}
}
}
actual typealias <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>Foo<!> = FooImpl
@@ -23976,6 +23976,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealias.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasExpandInTypeParam.kt")
public void testNestedClassViaActualTypealiasExpandInTypeParam() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/nestedClassViaActualTypealiasExpandInTypeParam.kt");
}
@Test
@TestMetadata("nestedClassViaActualTypealiasWithTypeParam.kt")
public void testNestedClassViaActualTypealiasWithTypeParam() throws Exception {