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
@@ -34660,6 +34660,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/reflection/typeOf/annotatedType.kt");
}
@TestMetadata("arrayOfNullableReified.kt")
public void testArrayOfNullableReified() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/arrayOfNullableReified.kt");
}
@TestMetadata("classes.kt")
public void testClasses() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/classes.kt");
@@ -34730,6 +34735,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/reflection/typeOf/rawTypes_before.kt");
}
@TestMetadata("reifiedAsNestedArgument.kt")
public void testReifiedAsNestedArgument() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/reifiedAsNestedArgument.kt");
}
@TestMetadata("typeOfCapturedStar.kt")
public void testTypeOfCapturedStar() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/typeOfCapturedStar.kt");
@@ -35871,6 +35881,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/reified/spreads.kt");
}
@TestMetadata("typeTokenWrapper.kt")
public void testTypeTokenWrapper() throws Exception {
runTest("compiler/testData/codegen/box/reified/typeTokenWrapper.kt");
}
@TestMetadata("varargs.kt")
public void testVarargs() throws Exception {
runTest("compiler/testData/codegen/box/reified/varargs.kt");