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

13 lines
335 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'mapTo(){}'"
// IS_APPLICABLE_2: false
import java.util.ArrayList
fun foo(list: List<MutableCollection<Int>>) {
var target: MutableCollection<Int>()
<caret>target = list.mapTo(ArrayList<Int>()) { it.size }
if (target.size > 100) {
target = ArrayList<Int>()
}
}