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;
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user