Prohibiting incorrect transformations of loops with expression-embedded break or continue + allowed "?: continue" pattern for mapNotNull
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
fun foo(list: List<String>, target: MutableList<String>) {
|
||||
<caret>for (s in list) {
|
||||
val length = if (s.isNotEmpty()) s.length else break
|
||||
target.add(length.toString())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user