any() and other find operations to work with checks for not null and is instance
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'any{}'"
|
||||
// IS_APPLICABLE_2: false
|
||||
fun foo(list: List<Any?>): Boolean {
|
||||
<caret>for (a in list) {
|
||||
if (a != null) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user