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

Implement add parameter support for target typed new #47929

Merged
merged 3 commits into from
Sep 24, 2020

Conversation

allisonchou
Copy link
Contributor

Fixes #42559.

(Created a separate issue #47928 for the other bug mentioned in the original issue for clarity.)

@allisonchou allisonchou requested a review from a team as a code owner September 22, 2020 04:38
Copy link
Contributor

@davidwengier davidwengier left a 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 :)

@CyrusNajmabadi
Copy link
Member

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?

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.

Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a 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.

@allisonchou allisonchou merged commit d697040 into dotnet:master Sep 24, 2020
@ghost ghost added this to the Next milestone Sep 24, 2020
@allisonchou allisonchou deleted the AddParameterTargetTypedNew2 branch September 24, 2020 04:58
@Cosifne Cosifne modified the milestones: Next, 16.9.P1 Oct 12, 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.

AddParameter and target-typed new
4 participants