[FIR] Report warning on non-deprecated overrides of deprecated members

^KT-47902
This commit is contained in:
Dmitriy Novozhilov
2021-08-27 17:30:59 +03:00
parent ef9ad5af51
commit 88913aa2a3
18 changed files with 140 additions and 40 deletions
@@ -16,7 +16,7 @@ interface WithDeprecation {
}
class A : J(), WithDeprecation {
override fun foo() {}
override fun <!OVERRIDE_DEPRECATION!>foo<!>() {}
}
fun main() {
@@ -0,0 +1,23 @@
// FILE: J.java
public interface J {
@Deprecated
public void foo();
}
// FILE: J2.java
public interface J2 extends J {
@Override
public void foo();
}
// FILE: main.kt
interface A : J {
override fun <!OVERRIDE_DEPRECATION!>foo<!>()
}
fun main(j: J, j2: J2, a: A) {
j.<!DEPRECATION!>foo<!>()
j2.foo()
a.foo()
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// FILE: J.java
public interface J {
@Deprecated