Implement add parameter support for target typed new#47929
Implement add parameter support for target typed new#47929allisonchou merged 3 commits intodotnet:masterfrom
Conversation
davidwengier
left a comment
There was a problem hiding this comment.
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
CyrusNajmabadi
left a comment
There was a problem hiding this comment.
LGTM with the suggestions below.
Fixes #42559.
(Created a separate issue #47928 for the other bug mentioned in the original issue for clarity.)