-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 Introduce Parameter Crash #72191
Conversation
I don't see a test that shows how this fixes things. As teh problem is uncorrectly rewriting a conditional binding ( |
I tagged the wrong issue sorry, this is just a more thorough fix for the #72034 |
FeaturesResources.into_extracted_method_to_invoke_at_call_sites, allOccurrences: false, IntroduceParameterCodeActionKind.Trampoline)); | ||
actionsBuilderAllOccurrences.Add(CreateNewCodeAction( | ||
FeaturesResources.into_extracted_method_to_invoke_at_call_sites, allOccurrences: true, IntroduceParameterCodeActionKind.Trampoline)); | ||
var containsObjectCreationReferences = methodCallSites.Values.SelectMany(invocations => invocations).Any(invocation => syntaxFacts.IsObjectCreationExpression(invocation)); |
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.
var containsObjectCreationReferences = methodCallSites.Values.SelectMany(invocations => invocations).Any(invocation => syntaxFacts.IsObjectCreationExpression(invocation)); | |
var containsObjectCreationReferences = methodCallSites.Values.Flatten().Any(invocation => syntaxFacts.IsObjectCreationExpression(invocation)); |
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.
.OfType<TObjectCreationExpression>().Any()
Fixes #72034