Replace deprecated symbol usage: move named lambda argument outside parentheses

#KT-31523 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-10-24 10:11:48 +09:00
committed by klunnii
parent d9cf4ee732
commit c09c0468d4
4 changed files with 29 additions and 1 deletions
@@ -0,0 +1,12 @@
// "Replace with 'newFun(p1, null, p2)'" "true"
interface I {
@Deprecated("", ReplaceWith("newFun(p1, null, p2)"))
fun oldFun(p1: String, p2: () -> Boolean)
fun newFun(p1: String, p2: String?, p3: () -> Boolean)
}
fun foo(i: I) {
i.<caret>oldFun(p1 = "a") { true }
}
@@ -0,0 +1,12 @@
// "Replace with 'newFun(p1, null, p2)'" "true"
interface I {
@Deprecated("", ReplaceWith("newFun(p1, null, p2)"))
fun oldFun(p1: String, p2: () -> Boolean)
fun newFun(p1: String, p2: String?, p3: () -> Boolean)
}
fun foo(i: I) {
i.<caret>newFun(p1 = "a", p2 = null) { true }
}