Shouldn't it be `KClass<DefaultClass>`? What...
# getting-started
k
Shouldn't it be
KClass<DefaultClass>
? What does the generic parameter on DefaultClass do here?
v
Do you mean something like this? fun <T> test(kotlinClass : KClass<out ParentClass<T>> = KClass<DefaultClass<T>>){
n
This is compiling:
Copy code
open class A<T>
class B<T> : A<T>()
fun test(clazz: KClass<out A<*> > = B::class) {}
v
Yes, but I need to keep the type T
n
So only this:
inline fun <reified T>test(clazz: KClass<out A<*> > = B::class, tclass : KClass<*> = T::class) {}