count() to merge with filterNotNull and filterIsInstance + changed test for KT-14191 to use sum()
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// INTENTION_TEXT: "Replace with 'count{}'"
|
||||
// IS_APPLICABLE_2: false
|
||||
fun f(list: List<Any?>): Int{
|
||||
val <caret>c = list.count { it != "" && it != null && it !is Int }
|
||||
return c
|
||||
}
|
||||
Reference in New Issue
Block a user