K2: add checker detecting protected Java field shadowed by a property
This commit is contained in:
committed by
teamcity
parent
6234da4c86
commit
949a39b80f
+27
@@ -0,0 +1,27 @@
|
||||
// FILE: A.java
|
||||
|
||||
package base;
|
||||
|
||||
public class A {
|
||||
String f = "OK";
|
||||
}
|
||||
|
||||
// FILE: B.kt
|
||||
|
||||
package base
|
||||
|
||||
open class B : A() {
|
||||
private val f = "FAIL"
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
|
||||
import base.B;
|
||||
|
||||
public class C extends B {}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String {
|
||||
return C().<!INVISIBLE_MEMBER!>f<!>
|
||||
}
|
||||
Reference in New Issue
Block a user