Rename: fix renaming of label by label reference in loop

#KT-29796 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-02-15 12:42:01 +09:00
committed by Alexander Podkhalyuzin
parent 76bdfddfea
commit b4789b95ef
9 changed files with 53 additions and 15 deletions
@@ -0,0 +1,6 @@
fun test() {
bar@ for (n in 1..10) {
if (n == 5) continue@bar
if (n > 8) break@bar
}
}
@@ -0,0 +1,6 @@
fun test() {
foo@ for (n in 1..10) {
if (n == 5) continue@foo
if (n > 8) break@/*rename*/foo
}
}
@@ -0,0 +1,5 @@
{
"type": "AUTO_DETECT",
"mainFile": "test.kt",
"newName": "bar"
}
@@ -0,0 +1,6 @@
fun test() {
bar@ for (n in 1..10) {
if (n == 5) continue@bar
if (n > 8) break@bar
}
}
@@ -0,0 +1,6 @@
fun test() {
foo@ for (n in 1..10) {
if (n == 5) continue@/*rename*/foo
if (n > 8) break@foo
}
}
@@ -0,0 +1,5 @@
{
"type": "AUTO_DETECT",
"mainFile": "test.kt",
"newName": "bar"
}