DeprecatedSymbolUsageFix to keep line breaks when possible
This commit is contained in:
+2
-1
@@ -8,5 +8,6 @@ fun newFun(p4: Int, p3: Int, p2: Int, p1: Int, p0: Int){}
|
||||
|
||||
fun foo() {
|
||||
newFun(/* 4 */ 4, 3, 2, // 2
|
||||
/* 1 */ 1, /* 0 */ 0)
|
||||
/* 1 */ 1,
|
||||
/* 0 */ 0)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Replace with 'newFun(p1, p2, 0)'" "true"
|
||||
|
||||
interface X {
|
||||
@deprecated("", ReplaceWith("newFun(p1, p2, 0)"))
|
||||
fun oldFun(p1: Int, p2: Int)
|
||||
|
||||
fun newFun(p1: Int, p2: Int, p3: Int)
|
||||
}
|
||||
|
||||
fun foo(x: X) {
|
||||
x.<caret>oldFun(
|
||||
1,
|
||||
2
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// "Replace with 'newFun(p1, p2, 0)'" "true"
|
||||
|
||||
interface X {
|
||||
@deprecated("", ReplaceWith("newFun(p1, p2, 0)"))
|
||||
fun oldFun(p1: Int, p2: Int)
|
||||
|
||||
fun newFun(p1: Int, p2: Int, p3: Int)
|
||||
}
|
||||
|
||||
fun foo(x: X) {
|
||||
x.newFun(1,
|
||||
2,
|
||||
0)
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Replace with 'newFun()'" "true"
|
||||
|
||||
@deprecated("", ReplaceWith("newFun()"))
|
||||
fun Int.oldFun(): Int = this
|
||||
|
||||
fun Int.newFun(): Int = this
|
||||
|
||||
fun foo(list: List<String>): Int {
|
||||
return list
|
||||
.filter { it.isNotEmpty() }
|
||||
.map { it.length() }
|
||||
.first()
|
||||
.<caret>oldFun()
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Replace with 'newFun()'" "true"
|
||||
|
||||
@deprecated("", ReplaceWith("newFun()"))
|
||||
fun Int.oldFun(): Int = this
|
||||
|
||||
fun Int.newFun(): Int = this
|
||||
|
||||
fun foo(list: List<String>): Int {
|
||||
return list
|
||||
.filter { it.isNotEmpty() }
|
||||
.map { it.length() }
|
||||
.first()
|
||||
.<caret>newFun()
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// "Replace with 'newFun(p1, p2, p3)'" "true"
|
||||
|
||||
interface X {
|
||||
@deprecated("", ReplaceWith("newFun(p1, p2, p3)"))
|
||||
fun oldFun(p1: Int, p2: Int, p3: Int)
|
||||
|
||||
fun newFun(p1: Int, p2: Int, p3: Int)
|
||||
}
|
||||
|
||||
fun foo(x: X) {
|
||||
x.<caret>oldFun(1,
|
||||
2,
|
||||
3)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// "Replace with 'newFun(p1, p2, p3)'" "true"
|
||||
|
||||
interface X {
|
||||
@deprecated("", ReplaceWith("newFun(p1, p2, p3)"))
|
||||
fun oldFun(p1: Int, p2: Int, p3: Int)
|
||||
|
||||
fun newFun(p1: Int, p2: Int, p3: Int)
|
||||
}
|
||||
|
||||
fun foo(x: X) {
|
||||
x.<caret>newFun(1,
|
||||
2,
|
||||
3)
|
||||
}
|
||||
Reference in New Issue
Block a user