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

9 lines
268 B
Kotlin
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).<caret>associateTo(destination) { getKey(it) to it }
}