0

When enable proguard then checks in my code are not working correctly. For example I have class:

class SomeData implements Parcelable

From kotlin code I check whether the passed object is SomeData (data is SomeData) . But the check returns me false, this not correct. Perhaps I should add some rule to avoid this? Please help me.

testivanivan
  • 967
  • 13
  • 36
  • Are you sure that `data` is really an instance of SomeData or `data` is not null? Demo: `val data: SomeData? = null; println(when (data) { is SomeData -> "is SomeData" else -> "¯\\_( ͡❛ ︵ ͡❛)_/¯" })` – ocos Sep 29 '22 at 11:35
  • Yes I'm sure I checked it – testivanivan Sep 29 '22 at 11:37
  • Can you share the exact code part how you check data is SomeData? Proguard removes unused code. Is the code reachable? – ocos Sep 29 '22 at 11:42

0 Answers0