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

Adjust closure initialization for primary constructor #66340

Conversation

AlekseyTs
Copy link
Contributor

No description provided.

@AlekseyTs
Copy link
Contributor Author

@cston, @jjonescz, @dotnet/roslyn-compiler Please review

1 similar comment
@AlekseyTs
Copy link
Contributor Author

@cston, @jjonescz, @dotnet/roslyn-compiler Please review

@@ -10261,7 +10245,7 @@ struct S1(Color Color)
{
public S1() : this(
Color.M1(
new Color()))
Copy link
Member

@jjonescz jjonescz Jan 12, 2023

Choose a reason for hiding this comment

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

new Color()

Should we test that the ambiguity error is raised even when one method is inapplicable due to argument type mismatch, e.g., calling Color.M1(new Color()) in this test? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we test that the ambiguity error is raised even when one method is inapplicable due to argument type mismatch, e.g., calling Color.M1(new Color()) in this test?

I think inapplicability scenarios are adequately covered by other targeted tests. For example, ParameterCapturing_027_ColorColor_MemberAccess_InstanceInapplicableAndStaticApplicableDueToArguments_Method. Also look for other tests with "Inapplicable" in the name. There is also ParameterCapturing_063_ColorColor_MemberAccess_InstanceAndStaticAmbiguity_Method_ApplicabilityDueToArgumentsNotConsidered.

@AlekseyTs
Copy link
Contributor Author

@cston, @dotnet/roslyn-compiler For the second review.

@AlekseyTs AlekseyTs merged commit 6cd1af5 into dotnet:features/PrimaryConstructors Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants