Philip Dukhov
03/24/2025, 5:57 AMtypeOf
related to generic type
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.Arkadii Ivanov
03/24/2025, 9:49 AMkey
property. I have an idea of deprecating the API without key
property, not sure yet.