Files
kotlin-fork/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.kt
T
Dmitriy Novozhilov ef9ad5af51 [FE 1.0] Report warning on non-deprecated overrides of deprecated members
Also don't propagate deprecation status to overrides after 1.7

^KT-47902 Fixed
2021-09-02 15:04:07 +03:00

14 lines
475 B
Kotlin
Vendored

// !JDK_KIND: MODIFIED_MOCK_JDK
// !CHECK_TYPE
interface A : MutableCollection<String> {
// Override of deprecated function could be marked as deprecated too
override fun <!OVERRIDE_DEPRECATION!>nonExistingMethod<!>(x: String) = ""
}
fun foo(x: MutableCollection<Int>, y: Collection<String>, z: A) {
x.<!DEPRECATION!>nonExistingMethod<!>(1).checkType { _<String>() }
y.<!DEPRECATION!>nonExistingMethod<!>("")
z.<!DEPRECATION!>nonExistingMethod<!>("")
}