[JVM_IR] Fix accessibility bridges for static protected fields.

Super-qualifiers have to be taken into account. Otherwise, too
few accessibility bridges will be generated which can lead to
binary compatibility issues.
This commit is contained in:
Mads Ager
2021-01-21 16:19:59 +01:00
committed by Alexander Udalov
parent 62897a194b
commit 6a959fefd0
6 changed files with 155 additions and 19 deletions
@@ -41,6 +41,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest("compiler/testData/codegen/bytecodeListing/accessorForTopLevelMembers.kt");
}
@TestMetadata("accessorsForProtectedStaticJavaFieldInOtherPackage.kt")
public void testAccessorsForProtectedStaticJavaFieldInOtherPackage() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.kt");
}
public void testAllFilesPresentInBytecodeListing() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@@ -41,6 +41,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest("compiler/testData/codegen/bytecodeListing/accessorForTopLevelMembers.kt");
}
@TestMetadata("accessorsForProtectedStaticJavaFieldInOtherPackage.kt")
public void testAccessorsForProtectedStaticJavaFieldInOtherPackage() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/accessorsForProtectedStaticJavaFieldInOtherPackage.kt");
}
public void testAllFilesPresentInBytecodeListing() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}