Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

nullref in SpecializedNamespace.get_Overloads #449

Closed
jakebailey opened this issue Dec 3, 2018 · 0 comments · Fixed by #451
Closed

nullref in SpecializedNamespace.get_Overloads #449

jakebailey opened this issue Dec 3, 2018 · 0 comments · Fixed by #451
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jakebailey
Copy link
Member

Seeing this one pop up. It looks like the checks on _original being null are not consistent in this file.

Also, the statements ending in ?.MaybeEnumerate() are likely not needed either. ripgrepping shows:

$ rg '\?\.MaybeEnumerate'
src\Analysis\Engine\Impl\ModuleAnalysis.cs
356:            if (v.Variable?.Types?.MaybeEnumerate().FirstOrDefault() is ParameterInfo) {

src\Analysis\Engine\Impl\Values\SpecializedNamespace.cs
212:        public override IEnumerable<ILocationInfo> Locations => _original?.Locations?.MaybeEnumerate();
220:        internal override IEnumerable<ILocationInfo> References => _original.References?.MaybeEnumerate();

I have a fix ready, just making this for tracking.

@jakebailey jakebailey added the bug Something isn't working label Dec 3, 2018
@jakebailey jakebailey added this to the Dec 2018.1 milestone Dec 3, 2018
@jakebailey jakebailey self-assigned this Dec 3, 2018
jakebailey added a commit that referenced this issue Dec 3, 2018
…cess (#451)

Fixes #449.

Also fixes an ArgumentNullException in a dictionary TryGetValue in ProtocolInfo. I'm not sure why that one is happening, but it's also showing up as frequently as the SpecializedNamespace issue.
jakebailey added a commit to jakebailey/python-language-server that referenced this issue Nov 1, 2019
…cess (microsoft#451)

Fixes microsoft#449.

Also fixes an ArgumentNullException in a dictionary TryGetValue in ProtocolInfo. I'm not sure why that one is happening, but it's also showing up as frequently as the SpecializedNamespace issue.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
1 participant