7d98103c0c
Fake overrides are still created for java static with non-empty overriddenDescriptors Add tests for inheriting visibility for java static members Add test: check that java static declarations that shadow deprecated declarations should not be deprecated Add test for corner case where "overriding" java static constant led to incorrect type in inheritor Fix test data for existing tests
54 lines
717 B
Kotlin
Vendored
54 lines
717 B
Kotlin
Vendored
// FILE: A.java
|
|
|
|
public class A {
|
|
|
|
@Deprecated
|
|
public static final String D = "d";
|
|
|
|
@Deprecated
|
|
public void f() {
|
|
return text;
|
|
}
|
|
|
|
@Deprecated
|
|
public static void bar() {
|
|
}
|
|
}
|
|
|
|
// FILE: B.java
|
|
|
|
public class B extends A {
|
|
|
|
public static final String D = "d";
|
|
|
|
@Override
|
|
public void f() {
|
|
return text;
|
|
}
|
|
|
|
public static void bar() {
|
|
}
|
|
}
|
|
|
|
|
|
// FILE: C.java
|
|
|
|
public class C extends A {
|
|
}
|
|
|
|
// FILE: use.kt
|
|
|
|
fun use(a: A, b: B, c: C) {
|
|
a.<!DEPRECATION!>f<!>()
|
|
b.<!DEPRECATION!>f<!>()
|
|
c.<!DEPRECATION!>f<!>()
|
|
|
|
A.<!DEPRECATION!>D<!>
|
|
B.D
|
|
C.<!DEPRECATION!>D<!>
|
|
|
|
A.<!DEPRECATION!>bar<!>()
|
|
B.bar()
|
|
C.<!DEPRECATION!>bar<!>()
|
|
}
|