[Test] Add test for expect nested classes unwrapping
...in type arguments, when they were actualized via typealias. ^KT-31636
This commit is contained in:
committed by
Space Team
parent
4aaf290c99
commit
cec644e9db
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+17
@@ -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
|
||||
Vendored
+17
@@ -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
|
||||
+17
@@ -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
|
||||
Generated
+6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user