[FIR] Don't report EXPOSED_FUNCTION_RETURN_TYPE on property accessors
This commit is contained in:
committed by
TeamCityServer
parent
3a34a2ca62
commit
f7c68afb18
+6
@@ -30930,6 +30930,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
public void testLackOfInvisibleSetterOfJavaClassInSamePackage() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/lackOfInvisibleSetterOfJavaClassInSamePackage.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("protectedInternal.kt")
|
||||
public void testProtectedInternal() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/protectedInternal.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -30930,6 +30930,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
public void testLackOfInvisibleSetterOfJavaClassInSamePackage() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/lackOfInvisibleSetterOfJavaClassInSamePackage.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("protectedInternal.kt")
|
||||
public void testProtectedInternal() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/visibility/protectedInternal.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ object FirExposedVisibilityDeclarationChecker : FirBasicDeclarationChecker() {
|
||||
val functionVisibility = (declaration as FirMemberDeclaration).effectiveVisibility
|
||||
|
||||
if (functionVisibility == EffectiveVisibility.Local) return
|
||||
if (declaration !is FirConstructor) {
|
||||
if (declaration !is FirConstructor && declaration !is FirPropertyAccessor) {
|
||||
val restricting = declaration.returnTypeRef.coneTypeSafe<ConeKotlinType>()
|
||||
?.findVisibilityExposure(context, functionVisibility)
|
||||
if (restricting != null) {
|
||||
|
||||
Reference in New Issue
Block a user