Files
kotlin-fork/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt
T
Dmitry Jemerov e2f75463d7 Rewrite AbstractQuickFixTest based on light fixture test case
Don't reconfigure runtime before every test. For consistency,
mark tests that require the runtime with directives instead of relying
on test file names.
2017-03-27 19:48:43 +02:00

17 lines
316 B
Kotlin
Vendored

// "Replace with 's.newFun(this)'" "true"
// WITH_RUNTIME
class X {
@Deprecated("", ReplaceWith("s.newFun(this)"))
fun oldFun(s: String): String = s.newFun(this)
}
fun String.newFun(x: X): String = this
fun foo(x: X?, p: Boolean) {
val v = if (p)
x?.<caret>oldFun("a")
else
null
}