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

9 lines
257 B
Plaintext
Vendored

// PROBLEM: Replace 'associateTo' with 'associateByTo'
// FIX: Replace with 'associateByTo'
// WITH_RUNTIME
fun getKey(i: Int): Long = 1L
fun test() {
val destination = mutableMapOf<Long, Int>()
listOf(1).associateByTo(destination) { getKey(it) }
}