Another fight with generics: I have a function tha...
# announcements
p
Another fight with generics: I have a function that an object with the type of my class:
Copy code
fun <VH : RecyclerView.ViewHolder> addComponents(component: AdapterComponent<T, VH>) {
  helper.addComponents(component)
}
Now I want this as a `vararg`:
Copy code
fun addComponents(vararg component: AdapterComponent<*, *>) {
  helper.addComponents(*component)
}
How can I add the type parameter so it's no longer a star projection? The whole class would be here: https://github.com/PaulWoitaschek/Voice/blob/master/app/src/main/java/de/ph1b/audiobook/misc/recyclerComponent/CompositeListAdapter.kt