[Test] Add test for current behavior of resolution of nested class type
...when it is actualized via typealias. ^KT-31636
This commit is contained in:
committed by
Space Team
parent
205690b220
commit
5147a5e805
+6
@@ -24060,6 +24060,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/supertypeActualizationWithAny.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeResolutionOfNestedClassActualizedViaTypealias.kt")
|
||||
public void testTypeResolutionOfNestedClassActualizedViaTypealias() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/typeResolutionOfNestedClassActualizedViaTypealias.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varSetterVisibility.kt")
|
||||
public void testVarSetterVisibility() throws Exception {
|
||||
|
||||
+6
@@ -24060,6 +24060,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/supertypeActualizationWithAny.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeResolutionOfNestedClassActualizedViaTypealias.kt")
|
||||
public void testTypeResolutionOfNestedClassActualizedViaTypealias() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/typeResolutionOfNestedClassActualizedViaTypealias.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varSetterVisibility.kt")
|
||||
public void testVarSetterVisibility() throws Exception {
|
||||
|
||||
+6
@@ -421,6 +421,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/supertypeActualizationWithAny.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeResolutionOfNestedClassActualizedViaTypealias.kt")
|
||||
public void testTypeResolutionOfNestedClassActualizedViaTypealias() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/typeResolutionOfNestedClassActualizedViaTypealias.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varSetterVisibility.kt")
|
||||
public void testVarSetterVisibility() throws Exception {
|
||||
|
||||
+6
@@ -421,6 +421,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/supertypeActualizationWithAny.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeResolutionOfNestedClassActualizedViaTypealias.kt")
|
||||
public void testTypeResolutionOfNestedClassActualizedViaTypealias() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/typeResolutionOfNestedClassActualizedViaTypealias.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varSetterVisibility.kt")
|
||||
public void testVarSetterVisibility() throws Exception {
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
expect class Foo {
|
||||
class Nested
|
||||
}
|
||||
|
||||
fun foo(p: Foo.Nested) {}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
class FooImpl {
|
||||
class Nested
|
||||
}
|
||||
|
||||
actual typealias Foo = FooImpl
|
||||
|
||||
fun test() {
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>FooImpl.Nested()<!>)
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
expect class Foo {
|
||||
class Nested
|
||||
}
|
||||
|
||||
fun foo(p: Foo.<!UNRESOLVED_REFERENCE{JVM}!>Nested<!>) {}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
class FooImpl {
|
||||
class Nested
|
||||
}
|
||||
|
||||
actual typealias Foo = FooImpl
|
||||
|
||||
fun test() {
|
||||
foo(FooImpl.Nested())
|
||||
}
|
||||
Generated
+6
@@ -24060,6 +24060,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/supertypeActualizationWithAny.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeResolutionOfNestedClassActualizedViaTypealias.kt")
|
||||
public void testTypeResolutionOfNestedClassActualizedViaTypealias() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/typeResolutionOfNestedClassActualizedViaTypealias.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varSetterVisibility.kt")
|
||||
public void testVarSetterVisibility() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user