11a3482970
#KT-38632 Fixed
12 lines
420 B
Plaintext
Vendored
12 lines
420 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with 'flatMap{}.mapNotNull{}.mapTo(){}'"
|
|
// INTENTION_TEXT_2: "Replace with 'asSequence().flatMap{}.mapNotNull{}.mapTo(){}'"
|
|
fun foo(list: List<String>, target: MutableList<String>) {
|
|
<caret>list
|
|
.asSequence()
|
|
.flatMap { it.indices.asSequence() }
|
|
.mapNotNull { bar(it) }
|
|
.mapTo(target) { it.substring(1) }
|
|
}
|
|
|
|
fun bar(p: Int): String? = null |