Fix type table serialization in DescriptorSerializer

Always serialize type table (and version requirement table) after
everything else, to prevent bugs like KT-51446 where inline class
underlying type was added to the type table after it has already been
serialized.

 #KT-51446 Fixed
This commit is contained in:
Alexander Udalov
2022-02-22 21:58:19 +01:00
parent c53d91bae1
commit b443848ea0
11 changed files with 78 additions and 54 deletions
@@ -5700,6 +5700,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClasses/privateConstructorWithPrivateField.kt");
}
@Test
@TestMetadata("privateConstructorWithPrivateFieldUsingTypeTable.kt")
public void testPrivateConstructorWithPrivateFieldUsingTypeTable() throws Exception {
runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/inlineClasses/privateConstructorWithPrivateFieldUsingTypeTable.kt");
}
@Test
@TestMetadata("privateTopLevelValInDifferentModule.kt")
public void testPrivateTopLevelValInDifferentModule() throws Exception {