I have a function with a vararg parameter. This vararg parameter needs to be passed to another function as a list.
How do I convert the vararg param into a list? listOf()
gave me an error.
fun insertMissingEntities(vararg entities: Entity) {
val list = listOf(entities)
passMissingEntities(list) // Type mismatch.
// Required: List<Entity>
// Found: List<Array<out Entity>>
}