19 lines
368 B
Kotlin
Vendored
19 lines
368 B
Kotlin
Vendored
// "Replace with 'c.newFun(this)'" "true"
|
|
|
|
class X {
|
|
@deprecated("", ReplaceWith("c.newFun(this)"))
|
|
fun oldFun(c: Char): Char = c.newFun(this)
|
|
}
|
|
|
|
fun Char.newFun(x: X): Char = this
|
|
|
|
fun foo(x: X?, p: Boolean, s: String) {
|
|
val chars = s.filter {
|
|
val v = if (p)
|
|
x?.<caret>oldFun(it)
|
|
else
|
|
null
|
|
v != 'a'
|
|
}
|
|
}
|