https://kotlinlang.org logo
Title
p

Phani Mahesh

06/14/2022, 12:49 PM
I have a strange problem. I need to recursively call a reified inline function, which is disallowed by the compiler. any workarounds? to avoid XY problem, here’s what my actual goal is: I am writing a custom transformer on data classes that does something based on annotated fields, and I want to be able to use these data classes themselves as fields.
m

marstran

06/14/2022, 12:53 PM
Write the implementation in a non-reified version taking a
KClass<T>
parameter, and then call that function from the reified function with
f(T::class)
☝️ 2
:thank-you: 1