FIR checker: resolve property with protected getter and public setter
Assuming Java class `Super` has a protected `getName` method and a public `setName` method. Then, in a subclass of `Super`, FE1.0 allows calls to `setName` via the property syntax if the property is protected and invisible due to dispatch receiver is not `this` or `super`.
This commit is contained in:
committed by
TeamCityServer
parent
f27f91b03a
commit
f35680f0a4
+6
@@ -22527,6 +22527,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/properties/lateinitOnTopLevel.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("protectedGetterWithPublicSetter.kt")
|
||||
public void testProtectedGetterWithPublicSetter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/properties/protectedGetterWithPublicSetter.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/properties/backingField")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user