JVM_IR KT-46597 fix receiver type for inlined callable reference

Receiver type is used by SyntheticAccessorLowering to determine class in
which a synthetic accessor should be generated.
This commit is contained in:
Dmitry Petrov
2021-05-17 15:56:41 +03:00
committed by TeamCityServer
parent 80ce3a5cf8
commit 3a0e3798ec
23 changed files with 612 additions and 60 deletions
@@ -32276,46 +32276,99 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt");
}
@TestMetadata("compiler/testData/codegen/box/syntheticAccessors/kt46578")
@TestMetadata("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Kt46578 extends AbstractLightAnalysisModeTest {
public static class ProtectedJavaFieldAccessor extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInKt46578() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticAccessors/kt46578"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
public void testAllFilesPresentInProtectedJavaFieldAccessor() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("kt46578_anonObject.kt")
public void testKt46578_anonObject() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/kt46578/kt46578_anonObject.kt");
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt46578_anonObject.kt");
}
@TestMetadata("kt46578_delegated.kt")
public void testKt46578_delegated() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/kt46578/kt46578_delegated.kt");
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt46578_delegated.kt");
}
@TestMetadata("kt46578_kotlin_delegated.kt")
public void testKt46578_kotlin_delegated() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/kt46578/kt46578_kotlin_delegated.kt");
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt46578_kotlin_delegated.kt");
}
@TestMetadata("kt46578_kotlin_propertyRef.kt")
public void testKt46578_kotlin_propertyRef() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/kt46578/kt46578_kotlin_propertyRef.kt");
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt46578_kotlin_propertyRef.kt");
}
@TestMetadata("kt46578_lambda.kt")
public void testKt46578_lambda() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/kt46578/kt46578_lambda.kt");
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt46578_lambda.kt");
}
@TestMetadata("kt46578_propertyRef.kt")
public void testKt46578_propertyRef() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/kt46578/kt46578_propertyRef.kt");
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedJavaFieldAccessor/kt46578_propertyRef.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ProtectedMemberReferenceAccessor extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInProtectedMemberReferenceAccessor() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("kt46597_crossinline_java_field.kt")
public void testKt46597_crossinline_java_field() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_crossinline_java_field.kt");
}
@TestMetadata("kt46597_crossinline_jvmField_property.kt")
public void testKt46597_crossinline_jvmField_property() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_crossinline_jvmField_property.kt");
}
@TestMetadata("kt46597_crossinline_method.kt")
public void testKt46597_crossinline_method() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_crossinline_method.kt");
}
@TestMetadata("kt46597_crossinline_property.kt")
public void testKt46597_crossinline_property() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_crossinline_property.kt");
}
@TestMetadata("kt46597_java_field.kt")
public void testKt46597_java_field() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_java_field.kt");
}
@TestMetadata("kt46597_jvmField_property.kt")
public void testKt46597_jvmField_property() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_jvmField_property.kt");
}
@TestMetadata("kt46597_method.kt")
public void testKt46597_method() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_method.kt");
}
@TestMetadata("kt46597_property.kt")
public void testKt46597_property() throws Exception {
runTest("compiler/testData/codegen/box/syntheticAccessors/protectedMemberReferenceAccessor/kt46597_property.kt");
}
}
}