-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
The == operator only compares the reference #661
Comments
Right now I work around this problem by defining my own
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default
==
and!=
operator compare equality by reference. So when I have classes overridesEquals()
method, these customized equal logic won't be honored. The same issue also impactscontains
binary operator. Ideally when compare objects or check if an array contains an object, we should compare value instead of reference.The text was updated successfully, but these errors were encountered: