Files
kotlin-fork/idea/testData/inspectionsLocal/replaceAssociateFunction/associateWithTo/basic5.kt
T

10 lines
286 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, { it to "$it" })
}