-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IncompatibleClassChangeError
on sealed type fields
#643
Comments
Thanks for reporting this, I can reproduce it. It's indeed related to #564. Not sure about #638, since Kotlin (probably) doesn't compile its sealed classes down to Java's sealed classes (yet?), although the solutions to both problems might be similar. I want to make some smart logic to find final or non-sealed implementations of the sealed class/interface to use as prefab values, but until then, adding prefab values yourself is indeed the way to go. Maybe I could make the error message a bit more helpful in the mean time though. |
I think you can leverage the new methods
|
Indeed, it shouldn't be too hard...just haven't found time to look into it yet 😅 |
Kotlin 1.7 combined with Java 17 does compile sealed classes down to Java's sealed classes. |
It finally happened! EqualsVerifier 3.14 is now syncing with Maven Central. It fixes this issue and also some other related to sealed types. |
(This issue relates to #564 and possibly #638.)
If one applies
EqualsVerifier
to a class with a field of some sealed type, then an exception is thrown:Code to reproduce:
Tested against EqualsVerifier 3.10. The issue can be worked around by adding
.withPrefabValues(Super.class, mock(Sub.class), mock(Sub.class))
.The text was updated successfully, but these errors were encountered: