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:
+12
@@ -32486,6 +32486,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, 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 {
|
||||
@@ -32516,6 +32522,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
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 {
|
||||
|
||||
+12
@@ -32666,6 +32666,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, 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 {
|
||||
@@ -32696,6 +32702,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
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 {
|
||||
|
||||
+10
@@ -29295,6 +29295,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@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");
|
||||
@@ -29320,6 +29325,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/multipleLayers.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");
|
||||
|
||||
Reference in New Issue
Block a user