Files
kotlin-fork/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt.after
T
2015-09-04 18:19:31 +03:00

21 lines
405 B
Plaintext
Vendored

// "Replace with 'c1.newFun(this, c2)'" "true"
class X {
@Deprecated("", ReplaceWith("c1.newFun(this, c2)"))
fun oldFun(c1: Char, c2: Char): Char = c1.newFun(this, c2)
val c: Char = 'a'
}
fun Char.newFun(x: X, c: Char): Char = this
fun foo(s: String, x: X) {
val chars = s.filter {
O.x?.<caret>let { x1 -> it.newFun(x1, x.c) } != 'a'
}
}
object O {
var x: X? = null
}