Oh I see, thanks for the input, it just needs a le...
# getting-started
c
Oh I see, thanks for the input, it just needs a level of un-inlining, right?
k
Yeah, like you can do:
Copy code
inline fun <reified T> foo() = foo(T::class)

fun <T> foo(type: KClass<T>) { ... }
c
reified inline
is not for recursion I guess! But you gave me an idea with
KClass
Copy code
fun <T : Throwable> Throwable.isOfType(clazz: KClass<T>): Boolean = 
        this::class == clazz || cause?.isOfType(clazz)?: false