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

Fix for Visual Studio crashes when adding a parameter to a function #41274

Merged
merged 4 commits into from
Feb 3, 2020

Conversation

allisonchou
Copy link
Contributor

Fixes #40451.

Thanks to @dpoeschl for providing a very helpful simple repro in the original GitHub issue. 🎉

@allisonchou allisonchou added this to the 16.5 milestone Jan 29, 2020
@allisonchou allisonchou requested a review from a team January 29, 2020 01:35
@@ -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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.WhereAsArray?

Copy link
Contributor Author

@allisonchou allisonchou Jan 31, 2020

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.

Comment on lines 1973 to 1974


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One blank line only.

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@allisonchou allisonchou merged commit 01b85bc into dotnet:master Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visual Studio crashes when adding a parameter to a function
3 participants