Add inspection for unlabeled return inside lambda #KT-26511 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
ba32ed7404
commit
6cd13341ee
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.UnlabeledReturnInsideLambdaInspection
|
||||
@@ -0,0 +1,7 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
fun test() {
|
||||
listOf(1).forEach {
|
||||
if (it == 10) <caret>return@forEach
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// FIX: none
|
||||
// WITH_RUNTIME
|
||||
fun test() {
|
||||
listOf(1).forEach {
|
||||
if (it == 10) <caret>return
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
fun test() {
|
||||
listOf(1).forEach {
|
||||
fun foo() {
|
||||
if (it == 10) <caret>return
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user