Rename: Disable label rename outside of reference range
#KT-17128 Fixed
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo bar@ { return@bar false }
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo bar@ { return@bar /*rename*/ false }
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "AUTO_DETECT",
|
||||
"mainFile": "test.kt",
|
||||
"newName": "baz"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo bar@ { return@bar false }
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo bar@ { return/*rename*/@bar false }
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"type": "AUTO_DETECT",
|
||||
"mainFile": "test.kt",
|
||||
"newName": "baz"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
return@foo false
|
||||
}
|
||||
}
|
||||
+7
@@ -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"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun <R> foo(f: () -> R) = f()
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
return@foo false
|
||||
}
|
||||
}
|
||||
+7
@@ -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