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