Make add / remove labeled return working for hierarchical blocks
Related to KT-20439
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Add return@find"
|
||||
|
||||
fun foo() {
|
||||
listOf(1,2,3).find {
|
||||
if (it > 0) {
|
||||
<caret>true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Add return@find"
|
||||
|
||||
fun foo() {
|
||||
listOf(1,2,3).find {
|
||||
if (it > 0) {
|
||||
return@find true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
listOf(1,2,3).find {
|
||||
if (it > 0) {
|
||||
return@find <caret>true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
listOf(1,2,3).find {
|
||||
if (it > 0) {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user