``` val list = mutableListOf<Foo>() bar(*fo...
# announcements
k
Copy code
val list = mutableListOf<Foo>()

bar(*foo.toTypedArray())
i
kirillrakhman: There's a request to allow passing collections with the spread operator. https://youtrack.jetbrains.com/issue/KT-12663
k
yep, but that doesn't help with apis that only offer vararg functions. but I guess that's an api design issue, not so much language design
looking at
com.intellij.codeInspection.ProblemsHolder#registerProblem(com.intellij.psi.PsiElement, java.lang.String, com.intellij.codeInspection.LocalQuickFix...)
i
Why it doesn't? This issue suggest
listOf(*list)
being possible without changing the
listOf
signature.
k
interesting! I've known the issue but I didn't remember this detail
so, how about 1.2 then ? ­čÖé