Introduce Parameter: Do not remove unused parameters if new parameter is extracted with default value
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
fun foo(s: String, i: Int = a + b): Int {
|
||||
fun foo(a: Int, s: String, b: Int, i: Int = a + b): Int {
|
||||
return i * 2
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo("2")
|
||||
foo(1, "2", 3)
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
fun foo(s: String, i: Int = a + 1): Int {
|
||||
fun foo(a: Int, s: String, i: Int = a + 1): Int {
|
||||
val t = i * 2
|
||||
return i - t
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo("2")
|
||||
foo(1, "2")
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
fun foo(s: String, i: Int = a + 1): Int {
|
||||
fun foo(a: Int, s: String, i: Int = a + 1): Int {
|
||||
return i * 2
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo("2")
|
||||
foo(1, "2")
|
||||
}
|
||||
Reference in New Issue
Block a user