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

10 lines
283 B
Plaintext
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).associateWithTo(destination) { getValue(it) }
}