FIR: Refine visibility check for private methods defined in a class

- use-site should be contained within the class that owns callee symbol
- class-representative of dispatch receiver value
should be exactly the same as a container class of a callee (not its subtype)
This commit is contained in:
Denis.Zharkov
2022-05-27 16:02:31 +03:00
committed by teamcity
parent ddb140cc51
commit ccc32b4e3b
6 changed files with 61 additions and 57 deletions
@@ -33502,6 +33502,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/visibility/innerNestedAndAnonymousClasses.kt");
}
@Test
@TestMetadata("invisiblePrivateThroughSubClass.kt")
public void testInvisiblePrivateThroughSubClass() throws Exception {
runTest("compiler/testData/diagnostics/tests/visibility/invisiblePrivateThroughSubClass.kt");
}
@Test
@TestMetadata("invisibleSetterOfJavaClass.kt")
public void testInvisibleSetterOfJavaClass() throws Exception {