Hi, I have a question regarding kotlin reflection. Does anyone have experience with (sealed class).s...
j
Hi, I have a question regarding kotlin reflection. Does anyone have experience with (sealed class).sealedSubclasses? It always returns empty list if I apply obfuscation. Here’s the definition of classes
Copy code
sealed class Data

object DataChild1 : Data()

object DataChild2 : Data()
and this is what I am trying to do:
Copy code
val dataList = Data::class.sealedSubclasses.mapNotNull { it.objectInstance }
It works fine when I do not apply obfuscation.
Copy code
@Keep

-keep * extends Data
-keep class kotlin.Metadata { *; }
none of those worked 😞