DeprecatedSymbolUsageFix: keeping named arguments

This commit is contained in:
Valentin Kipyatkov
2015-05-22 16:23:17 +03:00
parent 0c397548e8
commit 2e2701aa61
7 changed files with 129 additions and 13 deletions
@@ -0,0 +1,12 @@
// "Replace with 'newFun(option1, option2, option3, null)'" "true"
interface I {
@deprecated("", ReplaceWith("newFun(option1, option2, option3, null)"))
fun oldFun(option1: String = "", option2: Int = 0, option3: Int = -1)
fun newFun(option1: String = "", option2: Int = 0, option3: Int = -1, option4: String? = "x")
}
fun foo(i: I) {
i.<caret>oldFun(option2 = 1)
}
@@ -0,0 +1,12 @@
// "Replace with 'newFun(option1, option2, option3, null)'" "true"
interface I {
@deprecated("", ReplaceWith("newFun(option1, option2, option3, null)"))
fun oldFun(option1: String = "", option2: Int = 0, option3: Int = -1)
fun newFun(option1: String = "", option2: Int = 0, option3: Int = -1, option4: String? = "x")
}
fun foo(i: I) {
i.<caret>newFun(option2 = 1, option4 = null)
}