I need to access to class type inside a generic extension function. For example, if I want to make an extension function to return a collections of the members of the type I am extending, I would do:
fun <T> T.getMembers() =
this::class.memberProperties
The problem is that I cannot do this::class nor T::class inside the function. Is there any way to access to the class type of a generic type?