Kotlin generics Array results in “Cannot use T as a reified type parameter. Use a class instead” but List does not
Looking at the declaration of emptyArray() in the kotlin stdlib (jvm), we notice the reified type parameter: public inline fun <reified @PureReifiable T> emptyArray(): Array<T> The reified type parameter means that you have access to the class of T at compile-time and can access it like T::class. You can read more about reified type parameters … Read more