Files
kotlin-fork/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.kt
T
Denis.Zharkov eae97e4f76 K1: Force propagating deprecation on NOT_CONSIDERED JDK members to overrides
^KT-60858 Related
KT-60659 In Progress
^KT-60769 In Progress
2023-08-03 13:31:07 +00: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<!>("")
}