fkrauthan
01/10/2019, 5:45 AMtest: KClass<Any>
how can I fix the problem that when for example passing in MyClass::class
the type missmatch error?Shawn
01/10/2019, 5:49 AM*
as in KClass<*>
, or use generics
fun <T : Any> foo(test: KClass<T>)
which one you pick depends on your actual requirementsT
such that it relates to MyClass
, but that’s for you to decideserebit
01/10/2019, 5:56 AMtest: KClass<out Any>
fkrauthan
01/10/2019, 6:02 AM