Skip to content
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

Rule S4050: Operators should be overloaded consistently #499

Closed
valhristov opened this issue Jun 30, 2017 · 0 comments
Closed

Rule S4050: Operators should be overloaded consistently #499

valhristov opened this issue Jun 30, 2017 · 0 comments
Assignees
Labels
Type: New Feature This hasn't been here before.
Milestone

Comments

@valhristov
Copy link
Contributor

valhristov commented Jun 30, 2017

RSPEC-4050

This rule raises an issue when any of these guidelines are not followed:

  • When providing operator == you should also provide operator != and vice-versa.
  • When providing operator == you should also provide Equals(Object) and GetHashCode().
  • When providing operator + or operator - you should also provide operator ==, respecting previous guidelines.

Contributes to MMF-963.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature This hasn't been here before.
Projects
None yet
Development

No branches or pull requests

3 participants