-
Notifications
You must be signed in to change notification settings - Fork 7
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
Replace equality checks on sealed objects with is
checks (fixes #129)
#130
Conversation
d794e89
to
27998dd
Compare
is
checks (fixes #129)
We could also either make it This also means that we can't use |
+1 to matching the constraints of an I think a |
processing-tests/common/test/kotlin/com/livefront/sealedenum/compilation/equality/Flag.kt
Outdated
Show resolved
Hide resolved
Is there any automated way to update the |
27998dd
to
281f1da
Compare
Ended up using that, and it seems to work pretty well. All tests are passing locally. Also moved the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any automated way to update the fileNameGenerated properties in the tests btw? I'm resorting to updating them manually, but with such a wide-reaching change, it takes a bit of time.
Unfortunately no, I've just manually updated them as well.
...g-common/src/main/kotlin/com/livefront/sealedenum/internal/common/spec/SealedEnumTypeSpec.kt
Outdated
Show resolved
Hide resolved
281f1da
to
6a93d13
Compare
I've opened #131 to suggest an automatic way of doing that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me, thank you for the change here and the contribution!
See #129 for the cause of the crash. This changes the code gen to do comparison checks on sealed objects using
is
instead of using equality. Also adds relevant tests.