[FIR] Ignore private properties in accessor override check
JavaClassUseSiteMemberScope won't return a Java method getFoo if there is an inherited Kotlin property foo in scope because calling this method would effectively call the property accessor which is not possible in Kotlin. This commit excludes private properties from this consideration because no accessor methods are generated for them, and so calling a Java method getFoo is ok. #KT-58577 Fixed
This commit is contained in:
committed by
Space Team
parent
442844f165
commit
993925f656
+6
@@ -19732,6 +19732,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/privateNestedClassStaticMember.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privatePropertyAndSetterMultiModule.kt")
|
||||
public void testPrivatePropertyAndSetterMultiModule() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/privatePropertyAndSetterMultiModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("protectedStaticSamePackage.kt")
|
||||
public void testProtectedStaticSamePackage() throws Exception {
|
||||
|
||||
+6
@@ -19732,6 +19732,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/privateNestedClassStaticMember.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("privatePropertyAndSetterMultiModule.kt")
|
||||
public void testPrivatePropertyAndSetterMultiModule() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/privatePropertyAndSetterMultiModule.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("protectedStaticSamePackage.kt")
|
||||
public void testProtectedStaticSamePackage() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user