Rename: Fix renaming of function by label reference inside of lambda argument
#KT-7520 Fixed
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
fun <R> bar(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
bar { return@bar false }
|
||||
|
||||
bar(fun(): Boolean { return@bar false })
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun <R> /*rename*/foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo { return@foo false }
|
||||
|
||||
foo(fun(): Boolean { return@foo false })
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "MARKED_ELEMENT",
|
||||
"mainFile": "test.kt",
|
||||
"newName": "bar"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun <R> bar(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
bar(fun(): Boolean { return@bar false })
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo(fun(): Boolean { return@/*rename*/foo false })
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "AUTO_DETECT",
|
||||
"mainFile": "test.kt",
|
||||
"newName": "bar"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun <R> bar(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
bar(fun(): Boolean { return@bar false })
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo(fun(): Boolean { return@foo/*rename*/ false })
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "AUTO_DETECT",
|
||||
"mainFile": "test.kt",
|
||||
"newName": "bar"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun <R> bar(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
bar {
|
||||
return@bar false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
return@/*rename*/foo false
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "AUTO_DETECT",
|
||||
"mainFile": "test.kt",
|
||||
"newName": "bar"
|
||||
}
|
||||
Reference in New Issue
Block a user