[IR] Support reflection for MFVC

Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
This commit is contained in:
Evgeniy.Zhelenskiy
2023-03-02 01:48:02 +01:00
committed by Space Team
parent 1ff4906880
commit 88f293d4a9
52 changed files with 2910 additions and 172 deletions
@@ -43521,6 +43521,100 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/call/valueClasses")
@TestDataPath("$PROJECT_ROOT")
public class ValueClasses {
@Test
public void testAllFilesPresentInValueClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("constructorWithMfvcParameters.kt")
public void testConstructorWithMfvcParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/constructorWithMfvcParameters.kt");
}
@Test
@TestMetadata("fieldAccessors.kt")
public void testFieldAccessors() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/fieldAccessors.kt");
}
@Test
@TestMetadata("functionsWithMfvcParameters.kt")
public void testFunctionsWithMfvcParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/functionsWithMfvcParameters.kt");
}
@Test
@TestMetadata("internalPrimaryValOfMfvc.kt")
public void testInternalPrimaryValOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/internalPrimaryValOfMfvc.kt");
}
@Test
@TestMetadata("jvmStaticFieldInObject.kt")
public void testJvmStaticFieldInObject() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/jvmStaticFieldInObject.kt");
}
@Test
@TestMetadata("jvmStaticFunction.kt")
public void testJvmStaticFunction() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/jvmStaticFunction.kt");
}
@Test
@TestMetadata("mfvcConstructor.kt")
public void testMfvcConstructor() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/mfvcConstructor.kt");
}
@Test
@TestMetadata("nonOverridingFunOfMfvc.kt")
public void testNonOverridingFunOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/nonOverridingFunOfMfvc.kt");
}
@Test
@TestMetadata("nonOverridingVarOfMfvc.kt")
public void testNonOverridingVarOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/nonOverridingVarOfMfvc.kt");
}
@Test
@TestMetadata("overridingFunOfMfvc.kt")
public void testOverridingFunOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/overridingFunOfMfvc.kt");
}
@Test
@TestMetadata("overridingVarOfMfvc.kt")
public void testOverridingVarOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/overridingVarOfMfvc.kt");
}
@Test
@TestMetadata("primaryValOfMfvc.kt")
public void testPrimaryValOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/primaryValOfMfvc.kt");
}
@Test
@TestMetadata("properties.kt")
public void testProperties() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/properties.kt");
}
@Test
@TestMetadata("suspendFunction.kt")
public void testSuspendFunction() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/suspendFunction.kt");
}
}
}
@Nested
@@ -43640,6 +43734,24 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt");
}
@Test
@TestMetadata("mfvcDefaultArguments.kt")
public void testMfvcDefaultArguments() throws Exception {
runTest("compiler/testData/codegen/box/reflection/callBy/mfvcDefaultArguments.kt");
}
@Test
@TestMetadata("mfvcFunctionsAndConstructors.kt")
public void testMfvcFunctionsAndConstructors() throws Exception {
runTest("compiler/testData/codegen/box/reflection/callBy/mfvcFunctionsAndConstructors.kt");
}
@Test
@TestMetadata("mfvcMembers.kt")
public void testMfvcMembers() throws Exception {
runTest("compiler/testData/codegen/box/reflection/callBy/mfvcMembers.kt");
}
@Test
@TestMetadata("nonDefaultParameterOmitted.kt")
public void testNonDefaultParameterOmitted() throws Exception {
@@ -44484,6 +44596,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnDefaultWithInlineClassArgument.kt");
}
@Test
@TestMetadata("reflectOnDefaultWithMfvcArgument.kt")
public void testReflectOnDefaultWithMfvcArgument() throws Exception {
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnDefaultWithMfvcArgument.kt");
}
@Test
@TestMetadata("reflectOnLambdaInArrayConstructor.kt")
public void testReflectOnLambdaInArrayConstructor() throws Exception {
@@ -44554,6 +44672,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/reflection/mapping/constructorWithInlineClassParameters.kt");
}
@Test
@TestMetadata("constructorWithMfvcParameters.kt")
public void testConstructorWithMfvcParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/constructorWithMfvcParameters.kt");
}
@Test
@TestMetadata("extensionProperty.kt")
public void testExtensionProperty() throws Exception {
@@ -44815,6 +44939,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt");
}
@Test
@TestMetadata("mfvcInSignature.kt")
public void testMfvcInSignature() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/types/mfvcInSignature.kt");
}
@Test
@TestMetadata("mfvcPrimaryVal.kt")
public void testMfvcPrimaryVal() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/types/mfvcPrimaryVal.kt");
}
@Test
@TestMetadata("overrideAnyWithPrimitive.kt")
public void testOverrideAnyWithPrimitive() throws Exception {
@@ -44881,6 +45017,28 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/mapping/valueClasses")
@TestDataPath("$PROJECT_ROOT")
public class ValueClasses {
@Test
public void testAllFilesPresentInValueClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mfvcPrimaryVal.kt")
public void testMfvcPrimaryVal() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/valueClasses/mfvcPrimaryVal.kt");
}
@Test
@TestMetadata("suspendFunctionWithMfvcInSignature.kt")
public void testSuspendFunctionWithMfvcInSignature() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/valueClasses/suspendFunctionWithMfvcInSignature.kt");
}
}
}
@Nested
@@ -45094,6 +45252,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt");
}
@Test
@TestMetadata("mfvc.kt")
public void testMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/modifiers/mfvc.kt");
}
@Test
@TestMetadata("properties.kt")
public void testProperties() throws Exception {
@@ -45904,6 +46068,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/reflection/typeOf/manyTypeArguments.kt");
}
@Test
@TestMetadata("mfvc.kt")
public void testMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/mfvc.kt");
}
@Test
@TestMetadata("multipleLayers.kt")
public void testMultipleLayers() throws Exception {
@@ -46013,6 +46183,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/inlineClasses.kt");
}
@Test
@TestMetadata("mfvc.kt")
public void testMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/mfvc.kt");
}
@Test
@TestMetadata("mutableCollections_after.kt")
public void testMutableCollections_after() throws Exception {
@@ -43521,6 +43521,100 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/call/valueClasses")
@TestDataPath("$PROJECT_ROOT")
public class ValueClasses {
@Test
public void testAllFilesPresentInValueClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("constructorWithMfvcParameters.kt")
public void testConstructorWithMfvcParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/constructorWithMfvcParameters.kt");
}
@Test
@TestMetadata("fieldAccessors.kt")
public void testFieldAccessors() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/fieldAccessors.kt");
}
@Test
@TestMetadata("functionsWithMfvcParameters.kt")
public void testFunctionsWithMfvcParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/functionsWithMfvcParameters.kt");
}
@Test
@TestMetadata("internalPrimaryValOfMfvc.kt")
public void testInternalPrimaryValOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/internalPrimaryValOfMfvc.kt");
}
@Test
@TestMetadata("jvmStaticFieldInObject.kt")
public void testJvmStaticFieldInObject() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/jvmStaticFieldInObject.kt");
}
@Test
@TestMetadata("jvmStaticFunction.kt")
public void testJvmStaticFunction() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/jvmStaticFunction.kt");
}
@Test
@TestMetadata("mfvcConstructor.kt")
public void testMfvcConstructor() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/mfvcConstructor.kt");
}
@Test
@TestMetadata("nonOverridingFunOfMfvc.kt")
public void testNonOverridingFunOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/nonOverridingFunOfMfvc.kt");
}
@Test
@TestMetadata("nonOverridingVarOfMfvc.kt")
public void testNonOverridingVarOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/nonOverridingVarOfMfvc.kt");
}
@Test
@TestMetadata("overridingFunOfMfvc.kt")
public void testOverridingFunOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/overridingFunOfMfvc.kt");
}
@Test
@TestMetadata("overridingVarOfMfvc.kt")
public void testOverridingVarOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/overridingVarOfMfvc.kt");
}
@Test
@TestMetadata("primaryValOfMfvc.kt")
public void testPrimaryValOfMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/primaryValOfMfvc.kt");
}
@Test
@TestMetadata("properties.kt")
public void testProperties() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/properties.kt");
}
@Test
@TestMetadata("suspendFunction.kt")
public void testSuspendFunction() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/valueClasses/suspendFunction.kt");
}
}
}
@Nested
@@ -43640,6 +43734,24 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt");
}
@Test
@TestMetadata("mfvcDefaultArguments.kt")
public void testMfvcDefaultArguments() throws Exception {
runTest("compiler/testData/codegen/box/reflection/callBy/mfvcDefaultArguments.kt");
}
@Test
@TestMetadata("mfvcFunctionsAndConstructors.kt")
public void testMfvcFunctionsAndConstructors() throws Exception {
runTest("compiler/testData/codegen/box/reflection/callBy/mfvcFunctionsAndConstructors.kt");
}
@Test
@TestMetadata("mfvcMembers.kt")
public void testMfvcMembers() throws Exception {
runTest("compiler/testData/codegen/box/reflection/callBy/mfvcMembers.kt");
}
@Test
@TestMetadata("nonDefaultParameterOmitted.kt")
public void testNonDefaultParameterOmitted() throws Exception {
@@ -44484,6 +44596,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnDefaultWithInlineClassArgument.kt");
}
@Test
@TestMetadata("reflectOnDefaultWithMfvcArgument.kt")
public void testReflectOnDefaultWithMfvcArgument() throws Exception {
runTest("compiler/testData/codegen/box/reflection/lambdaClasses/reflectOnDefaultWithMfvcArgument.kt");
}
@Test
@TestMetadata("reflectOnLambdaInArrayConstructor.kt")
public void testReflectOnLambdaInArrayConstructor() throws Exception {
@@ -44554,6 +44672,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/reflection/mapping/constructorWithInlineClassParameters.kt");
}
@Test
@TestMetadata("constructorWithMfvcParameters.kt")
public void testConstructorWithMfvcParameters() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/constructorWithMfvcParameters.kt");
}
@Test
@TestMetadata("extensionProperty.kt")
public void testExtensionProperty() throws Exception {
@@ -44815,6 +44939,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt");
}
@Test
@TestMetadata("mfvcInSignature.kt")
public void testMfvcInSignature() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/types/mfvcInSignature.kt");
}
@Test
@TestMetadata("mfvcPrimaryVal.kt")
public void testMfvcPrimaryVal() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/types/mfvcPrimaryVal.kt");
}
@Test
@TestMetadata("overrideAnyWithPrimitive.kt")
public void testOverrideAnyWithPrimitive() throws Exception {
@@ -44881,6 +45017,28 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/reflection/mapping/valueClasses")
@TestDataPath("$PROJECT_ROOT")
public class ValueClasses {
@Test
public void testAllFilesPresentInValueClasses() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("mfvcPrimaryVal.kt")
public void testMfvcPrimaryVal() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/valueClasses/mfvcPrimaryVal.kt");
}
@Test
@TestMetadata("suspendFunctionWithMfvcInSignature.kt")
public void testSuspendFunctionWithMfvcInSignature() throws Exception {
runTest("compiler/testData/codegen/box/reflection/mapping/valueClasses/suspendFunctionWithMfvcInSignature.kt");
}
}
}
@Nested
@@ -45094,6 +45252,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt");
}
@Test
@TestMetadata("mfvc.kt")
public void testMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/modifiers/mfvc.kt");
}
@Test
@TestMetadata("properties.kt")
public void testProperties() throws Exception {
@@ -45904,6 +46068,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/reflection/typeOf/manyTypeArguments.kt");
}
@Test
@TestMetadata("mfvc.kt")
public void testMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/mfvc.kt");
}
@Test
@TestMetadata("multipleLayers.kt")
public void testMultipleLayers() throws Exception {
@@ -46013,6 +46183,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/inlineClasses.kt");
}
@Test
@TestMetadata("mfvc.kt")
public void testMfvc() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/mfvc.kt");
}
@Test
@TestMetadata("mutableCollections_after.kt")
public void testMutableCollections_after() throws Exception {