Files
kotlin-fork/idea/testData/inspectionsLocal/replaceAssociateFunction/associateWithTo/basic3.kt
T
2019-03-11 19:33:17 +03:00

10 lines
296 B
Kotlin
Vendored

// PROBLEM: Replace 'associateTo' with 'associateWithTo'
// FIX: Replace with 'associateWithTo'
// WITH_RUNTIME
fun getValue(i: Int): String = ""
fun associateWithTo() {
val destination = mutableMapOf<Int, String>()
listOf(1).<caret>associateTo(destination) { Pair(it, getValue(it)) }
}