Grégory Lureau
02/07/2022, 4:58 PM./gradlew package
). I'm using a MAC M1.
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: class foo.bar.MyClass cannot be cast to class ....
interface Animal { fun foo() }
interface Mammal : Animal
class Tiger : Mammal { ... }
It crashes when I call foo()
on my Tiger instance.
If I check with is
, for some reasons Tiger is Animal
on IDE and Tiger is NOT Animal
once the app is packaged. (And Tiger is Mammal in both usage 🤷 )
Any idea what's going on?Grégory Lureau
02/07/2022, 4:59 PMolonho
02/07/2022, 5:19 PMGrégory Lureau
02/07/2022, 7:35 PM