In the release build with R8 I've got a crash from...
# decompose
p
In the release build with R8 I've got a crash from
typeOf
related to generic type
Copy code
data class InstanceToRetain<T>(val value: T)

retainedSimpleInstance { InstanceToRetain(0) }
Looks like it's something you've faced already, what do you think is the best workaround here? For now I switched to
T::class
, it obviously loses nested
T
info, but at least it would crash in debug app version if I try to use the same key somewhere, so it's easier to catch during development.
a
Yes, this is a known problem. The solution is to explicitly specify the
key
property. I have an idea of deprecating the API without
key
property, not sure yet.
❤️ 1