[FIR] Properly check for visibility in FirTypeIntersectionScopeContext
This fixes a false positive OVERRIDING_FINAL_MEMBER caused by a package-private member in a different package being added to the list of overridden symbols. However, in Java, package-private members from different packages are effectively like private members in that they cannot be overridden. #KT-61696 Fixed
This commit is contained in:
committed by
Space Team
parent
d16f33cf5b
commit
2bc25d4f6e
+6
@@ -24825,6 +24825,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt9550.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("packagePrivateAndPublic.kt")
|
||||
public void testPackagePrivateAndPublic() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/packagePrivateAndPublic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("returnTypeMismatch.kt")
|
||||
public void testReturnTypeMismatch() throws Exception {
|
||||
|
||||
+6
@@ -24825,6 +24825,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt9550.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("packagePrivateAndPublic.kt")
|
||||
public void testPackagePrivateAndPublic() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/packagePrivateAndPublic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("returnTypeMismatch.kt")
|
||||
public void testReturnTypeMismatch() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user