-
Notifications
You must be signed in to change notification settings - Fork 133
Bug fixes #418
Bug fixes #418
Conversation
src/LanguageServer/Impl/Implementation/Server.WorkspaceSymbols.cs
Outdated
Show resolved
Hide resolved
src/LanguageServer/Impl/Implementation/Server.WorkspaceSymbols.cs
Outdated
Show resolved
Hide resolved
jakebailey
left a comment
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.
Unless there's something else you want to address, LGTM.
src/LanguageServer/Impl/Implementation/Server.WorkspaceSymbols.cs
Outdated
Show resolved
Hide resolved
src/LanguageServer/Impl/Implementation/Server.WorkspaceSymbols.cs
Outdated
Show resolved
Hide resolved
| public override IEnumerable<ILocationInfo> Locations => _original.Locations?.MaybeEnumerate(); | ||
|
|
||
| public override string Name => _original == null ? base.Name : this._original.Name; | ||
| public override string Name => _original == null ? base.Name : _original.Name; |
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.
Why in this case we call base.Name, and in previous explicitly return empty enumerable instead of calling base.Locations, which also returns empty enumerable?
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.
Good question. No idea.
| return Enumerable.Empty<ILocationInfo>(); | ||
| } | ||
| return defns.Definitions.Select(l => l.GetLocationInfo()).Where(l => l != null); | ||
| return defns.Definitions.Select(l => l.GetLocationInfo()).ExcludeDefault(); |
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 like we have two almost identical methods: ExcludeDefaults and WhereNotNull.
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.
Yes ExcludeDefault came from RTVS extensions, looks like WhereNotNull is local thing
Fixes #397 (remove name protocol from tuple)
Fixes #383 (do not return nulls, return empty sets)
Fixes #378 (null check)
Fixes #379 (explicit protocol comparison)