JVM: partially reify typeOf and signatures as soon as possible

E.g. when substituting T -> Array<T>, write the bytecode for the
Array<...> part for typeOf.

This fixes various issues where either Array nesting levels, nullability
information (for typeOf), or entire reification markers were missing,
causing incorrect outputs ranging from missing `?`s to missing `[]`s to
just reified types not really being reified.

^KT-53761 Fixed
This commit is contained in:
pyos
2022-08-30 12:15:40 +02:00
committed by Alexander Udalov
parent 2e6817042c
commit 8d33de4297
20 changed files with 363 additions and 223 deletions
@@ -35743,6 +35743,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("arrayOfNullableReified.kt")
public void testArrayOfNullableReified() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/arrayOfNullableReified.kt");
}
@Test
@TestMetadata("classes.kt")
public void testClasses() throws Exception {
@@ -35773,6 +35779,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/reflection/typeOf/multipleLayers.kt");
}
@Test
@TestMetadata("reifiedAsNestedArgument.kt")
public void testReifiedAsNestedArgument() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/reifiedAsNestedArgument.kt");
}
@Test
@TestMetadata("typeOfCapturedStar.kt")
public void testTypeOfCapturedStar() throws Exception {