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

Target-typed new: Add tests following review #42930

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Mar 31, 2020

FYI @alrz

Relates to #28489

@jcouv jcouv added Area-Compilers Feature - Target-Typed New `new (args)` gets the created type inferred from context labels Mar 31, 2020
@jcouv jcouv added this to the Compiler.Net5 milestone Mar 31, 2020
@jcouv jcouv self-assigned this Mar 31, 2020
@jcouv jcouv marked this pull request as ready for review March 31, 2020 01:27
@jcouv jcouv requested a review from a team as a code owner March 31, 2020 01:27
@jcouv
Copy link
Member Author

jcouv commented Mar 31, 2020

@AlekseyTs does that cover the scenarios you had in mind?

@jcouv jcouv added the Test Test failures in roslyn-CI label Apr 1, 2020
@jcouv
Copy link
Member Author

jcouv commented Apr 1, 2020

@dotnet/roslyn-compiler Please review a small test-only change. Thanks

@jcouv jcouv merged commit 0ea11bd into dotnet:features/target-typed-new Apr 1, 2020
@jcouv jcouv deleted the add-tests branch April 1, 2020 23:02
{
public void M2(C c)
{
c.M(new());
Copy link
Contributor

Choose a reason for hiding this comment

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

new() [](start = 12, length = 5)

I think the interesting scenario is to test use-site diagnostics coming from the new, i.e. from the set of available constructors rather than form the set of available Ms.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sneaking test in another PR: 61ebdde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - Target-Typed New `new (args)` gets the created type inferred from context Test Test failures in roslyn-CI
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants