DeprecatedSymbolUsageFix: keeping named arguments
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// "Replace with 'newFun(p1, p2, null, option)'" "true"
|
||||
|
||||
interface I {
|
||||
@deprecated("", ReplaceWith("newFun(p1, p2, null, option)"))
|
||||
fun oldFun(p1: String, p2: Int, option: Int = 1)
|
||||
|
||||
fun newFun(p1: String, p2New: Int, p3: String?, option: Int = 2)
|
||||
}
|
||||
|
||||
fun foo(i: I) {
|
||||
i.<caret>oldFun("a", p2 = 0)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Replace with 'newFun(p1, p2, null, option)'" "true"
|
||||
|
||||
interface I {
|
||||
@deprecated("", ReplaceWith("newFun(p1, p2, null, option)"))
|
||||
fun oldFun(p1: String, p2: Int, option: Int = 1)
|
||||
|
||||
fun newFun(p1: String, p2New: Int, p3: String?, option: Int = 2)
|
||||
}
|
||||
|
||||
fun foo(i: I) {
|
||||
i.<caret>newFun("a", p2New = 0, p3 = null, option = 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>oldFun(option2 = 1)
|
||||
}
|
||||
+12
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user