fun foo(vararg strings: String) { /*...*/ }
Using
foo(strings = arrayOf("a", "b", "c"))
val list: MutableList<String> = listOf("a", "b", "c") as MutableList<String>
foo(strings = list.map { it }.toTypedArray())
Named arguments are not allowed for non-Kotlin functions (*.java)
So, in this case you should replace:
From: strings = list.map { it }.toTypedArray()
To: *list.map { it }.toTypedArray()
GL
Source