[KMP] Allow matching expect ctorless final classes to objects

both directly and via typealias.

This is a possible fix to KT-59747
This commit is contained in:
marat.akhin
2023-07-20 18:16:06 +02:00
committed by Space Team
parent 6df9ce23f7
commit ae4fab8483
30 changed files with 1273 additions and 1 deletions
@@ -28456,6 +28456,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/multiplatform/starImportOfExpectEnumWithActualTypeAlias.kt");
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/complexMatchings")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ComplexMatchings extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInComplexMatchings() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/complexMatchings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("expectCtorlessFinalToActualObject.kt")
public void testExpectCtorlessFinalToActualObject() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/complexMatchings/expectCtorlessFinalToActualObject.kt");
}
@TestMetadata("expectCtorlessFinalToActualUnit.kt")
public void testExpectCtorlessFinalToActualUnit() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/complexMatchings/expectCtorlessFinalToActualUnit.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -28928,6 +28951,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/complexMatchings")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ComplexMatchings extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInComplexMatchings() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/k2/complexMatchings"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("expectCtorlessFinalToActualObject.kt")
public void testExpectCtorlessFinalToActualObject() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/complexMatchings/expectCtorlessFinalToActualObject.kt");
}
@TestMetadata("expectCtorlessFinalToActualUnit.kt")
public void testExpectCtorlessFinalToActualUnit() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/k2/complexMatchings/expectCtorlessFinalToActualUnit.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/multiplatform/k2/defaultArguments")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)