How to get actual type arguments of a reified generic parameter in Kotlin?
Due to type erasure, actual generic arguments cannot be obtained through T::class token of a generic class. Different objects of a class must have the same class token, that’s why it cannot contain actual generic arguments. Edit: Since Kotlin 1.3.50, following the technique described below to get type information for a reified type parameter is … Read more