K2: add checker detecting protected Java field shadowed by a property

This commit is contained in:
Mikhail Glukhikh
2022-11-25 15:30:13 +01:00
committed by teamcity
parent 6234da4c86
commit 949a39b80f
25 changed files with 717 additions and 12 deletions
@@ -0,0 +1,27 @@
// FILE: A.java
package base;
class A {
public String f = "OK";
}
// FILE: B.kt
package base
open class B : <!EXPOSED_SUPER_CLASS!>A()<!> {
private val f = "FAIL"
}
// FILE: C.java
import base.B;
public class C extends B {}
// FILE: test.kt
fun box(): String {
return C().f
}