Slackbot
08/23/2019, 6:49 AMdiesieben07
08/23/2019, 7:08 AMKClass<T>
parameter and then write an inline extension which adapts it to a reified parameter.Joan Colmenero
08/23/2019, 7:25 AMJoan Colmenero
08/23/2019, 7:25 AMdiesieben07
08/23/2019, 7:26 AMinterface Foo {
fun <T : Any> methodWithTypeArg(type: KClass<T>)
}
inline fun <reified T : Any> Foo.methodWithTypeArg() = methodWithTypeArg(T::class)
diesieben07
08/23/2019, 7:26 AM