K J
12/29/2018, 7:00 AMval items = mutableListOf<T>()
override fun <U : T> typedItems(): List<U> {
return items.mapNotNull { it as? U }
}
but this is not?
val oldStuff = mutableListOf<List<*>>()
val newStuff = oldStuff.mapNotNull { it as? ArrayList<*> }
Dico
12/29/2018, 8:30 AMreified
type parameter.K J
12/30/2018, 12:04 AM