-
Notifications
You must be signed in to change notification settings - Fork 414
make CompletionItem implement IEquatable<CompletionItem> #1991
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
Conversation
a521d7b to
386b08d
Compare
| return true; | ||
| } | ||
|
|
||
| if (obj.GetType() != GetType()) |
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.
The new implementation does not check obj.GetType() != GetType(). That makes it difficult for derived classes to override the Equals methods correctly. CompletionItem is not a sealed class and should not be, as noted in #1962 (comment).
|
What is the rationale for this change? CompletionItem is a reference type, so implementing IEquatable<CompletionItem> does not help avoid any boxing. |
It helps to avoid casting and |
No description provided.