Generate classes in MultifileClassCodegen exactly the same as in PackageCodegen

Two known issues with generateNonPartClassDeclarations that was here
before were the fact that we didn't sort sealed classes and its
subclasses which led to NoSuchMethodError (KT-27097), and the fact that
we didn't skip expect classes which led to incorrect duplicate JVM class
name diagnostic (KT-30843)

 #KT-27097 Fixed
 #KT-30843 Fixed
This commit is contained in:
Alexander Udalov
2019-04-05 18:40:28 +02:00
parent c8c630cecb
commit 2f003ef545
11 changed files with 109 additions and 68 deletions
@@ -15822,6 +15822,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/multifileClasses/samePartNameDifferentFacades.kt");
}
@TestMetadata("sealedClassHierarchy.kt")
public void testSealedClassHierarchy() throws Exception {
runTest("compiler/testData/codegen/box/multifileClasses/sealedClassHierarchy.kt");
}
@TestMetadata("compiler/testData/codegen/box/multifileClasses/optimized")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -15878,6 +15883,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("expectClassInJvmMultifileFacade.kt")
public void testExpectClassInJvmMultifileFacade() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt");
}
@TestMetadata("noArgActualConstructor.kt")
public void testNoArgActualConstructor() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/noArgActualConstructor.kt");