Supported mapIndexedTo and mapIndexedNotNullTo

This commit is contained in:
Valentin Kipyatkov
2016-04-22 12:12:12 +03:00
parent 2652ea4233
commit b6e05e058e
10 changed files with 61 additions and 22 deletions
@@ -0,0 +1,7 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'mapIndexedTo(){}'"
fun foo(list: List<String>, target: MutableList<Int>) {
<caret>for ((index, s) in list.withIndex()) {
target.add(s.hashCode() * index)
}
}