-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix for Visual Studio crashes when adding a parameter to a function #41274
Conversation
@@ -32,8 +30,15 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.SignatureHelp | |||
memberGroup = memberGroup.Where(Function(m) m.IsStatic) | |||
End If | |||
|
|||
Dim accessibleMembers = memberGroup.Where(Function(m) m.IsAccessibleWithin(within, throughType:=throughType)).ToList() | |||
If accessibleMembers.Count = 0 Then | |||
Return memberGroup.Where(Function(m) m.IsAccessibleWithin(within, throughType)).ToImmutableArray() |
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.
.WhereAsArray
?
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.
Correct me if I'm wrong, but I don't think WhereAsArray
can be invoked here since memberGroup isn't an immutable array.
|
||
|
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.
One blank line only.
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 good!
Fixes #40451.
Thanks to @dpoeschl for providing a very helpful simple repro in the original GitHub issue. 🎉