[FIR] Check conflicting overloads via scopes

Scopes may return private symbols from
supertypes, they should not clash with
symbols from the current class.

For example, see:
`FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.FakeOverride#testPrivateFakeOverrides1`

Lombok shouldn't generate functions if the
user has defined explicit ones.

In K1 generated functions are not really
added to the declared members scope.

^KT-61243 Fixed
This commit is contained in:
Nikolay Lunyak
2023-09-20 16:52:32 +03:00
committed by Space Team
parent 973248f432
commit 4e58715760
24 changed files with 278 additions and 129 deletions
+8
View File
@@ -39,6 +39,11 @@ public class ClashTest extends SuperClass {
return human;
}
private int score;
public void setScore(int score, int times) {
}
static void test() {
val obj = new ClashTest();
@@ -88,6 +93,9 @@ fun test() {
<!VAL_REASSIGNMENT!>obj.age<!> = 12
val age = obj.age
obj.setScore(41)
obj.score = 12
obj.getName()
obj.setName("Al")