-
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
Implement add parameter support for target typed new #47929
Implement add parameter support for target typed new #47929
Conversation
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.
It's interesting to me that it needed this much change. Is it possible for SyntaxFacts.GetObjectCreationType
to do something different, so it could support implicit creation in the same way? Though getting it to return something such that GetSymbolInfo returns an INamedTypeSymbol might be impossible, I'm just thinking out loud :)
SyntaxFacts is just supposed to be purely syntactic, and only make it possible to treat really equivalent VB and C# constructs the same. So, in vb and C# tehre is an ObjectCreationExpressionSyntax. So SytnaxFacts allows you to operate over those same constructs agnostically. It is not for treating different language constructs in teh same language the same way. |
src/Features/Core/Portable/AddParameter/AbstractAddParameterCodeFixProvider.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/AddParameter/AbstractAddParameterCodeFixProvider.cs
Outdated
Show resolved
Hide resolved
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.
LGTM with the suggestions below.
Fixes #42559.
(Created a separate issue #47928 for the other bug mentioned in the original issue for clarity.)