Files
kotlin-fork/idea/testData/intentions/loopToCallChain/map/mapNotNullTo_elvisContinue.kt
T
2016-08-23 22:47:42 +03:00

9 lines
258 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'mapNotNullTo(){}'"
// IS_APPLICABLE_2: false
fun foo(list: List<String?>, target: MutableList<Int>) {
<caret>for (s in list) {
val length = s?.length ?: continue
target.add(length)
}
}