DeprecatedSymbolUsageFix - handling of complex expressions used twice

This commit is contained in:
Valentin Kipyatkov
2015-05-19 12:57:58 +03:00
parent 4999958ca4
commit a773542d47
20 changed files with 419 additions and 17 deletions
@@ -0,0 +1,16 @@
// "Replace with 'newFun(this, p)'" "true"
class C {
@deprecated("", ReplaceWith("newFun(this, p)"))
fun oldFun(p: Int){}
}
fun C.newFun(c: C, p: Int){}
val bar = 0
fun foo() {
getBar().<caret>oldFun(bar)
}
fun getBar(): C = C()