Files
kotlin-fork/idea/testData/inspectionsLocal/collections/convertCallChainIntoSequence/noTargetTermination.kt
T
Toshiaki Kameyama 7e28cb1fe3 Call chain --> Sequence: take termination into account
Related to KT-15476
2018-08-08 11:02:47 +03:00

8 lines
187 B
Kotlin
Vendored

// WITH_RUNTIME
fun test(list: List<List<Int>>): List<Int> {
return list
.<caret>filter { it.count() > 2 }
.map { it + it }
.flatMap { it + it }
}