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

10 lines
268 B
Plaintext
Vendored

// HIGHLIGHT: INFORMATION
// PROBLEM: Replace 'associate' with 'associateBy'
// FIX: Replace with 'associateBy'
// WITH_RUNTIME
fun getKey(i: Int): Long = 1L
fun getValue(i: Int): String = ""
fun test() {
arrayOf(1).associateBy({ getKey(it) }, { getValue(it) })
}