JVM IR: do not generate extension receiver parameter as ACC_MANDATED

Otherwise Java reflection is not able to load its type as a
parameterized type.

 #KT-40857 Fixed
This commit is contained in:
Alexander Udalov
2023-02-28 23:30:23 +01:00
committed by Space Team
parent d23a4f46cc
commit 47c48efa33
9 changed files with 62 additions and 16 deletions
@@ -28509,11 +28509,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ParametersMetadata extends AbstractLightAnalysisModeTest {
@TestMetadata("extensionFunction.kt")
public void ignoreExtensionFunction() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/extensionFunction.kt");
}
@TestMetadata("inlineClassMethodParameterModifiers.kt")
public void ignoreInlineClassMethodParameterModifiers() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/inlineClassMethodParameterModifiers.kt");
}
@TestMetadata("jvmOverloads.kt")
public void ignoreJvmOverloads() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/jvmOverloads.kt");
}
@TestMetadata("kt40857_parameterizedExtensionReceiver.kt")
public void ignoreKt40857_parameterizedExtensionReceiver() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/kt40857_parameterizedExtensionReceiver.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@@ -28537,21 +28552,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/parametersMetadata/enum.kt");
}
@TestMetadata("extensionFunction.kt")
public void testExtensionFunction() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/extensionFunction.kt");
}
@TestMetadata("function.kt")
public void testFunction() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/function.kt");
}
@TestMetadata("inlineClassMethodParameterModifiers.kt")
public void testInlineClassMethodParameterModifiers() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/inlineClassMethodParameterModifiers.kt");
}
@TestMetadata("inlineClassMethodParameterNames.kt")
public void testInlineClassMethodParameterNames() throws Exception {
runTest("compiler/testData/codegen/box/parametersMetadata/inlineClassMethodParameterNames.kt");