I know that is odd code, its from like 1940 Kotlin...
# eap
a
I know that is odd code, its from like 1940 Kotlin. (the year). When modernized to this, no warning: It is
toTypedArray()
causing it on many things. And I know this is odd code because when modernized to the following, no warning:
Copy code
private val people = listOf(
            Person(1, "Frank", 30),
            Person(2, "Domingo", 19),
            Person(3, "Mariana", 22),
            Person(4, "Lucia", 31)
    ).associateByTo(HashMap()) { it.id }
but this makes the warning:
Copy code
val x = listOf(1,2,3).map { it to it * 4 }.toTypedArray()