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

AddParameter and target-typed new #42559

Closed
jcouv opened this issue Mar 19, 2020 · 0 comments · Fixed by #47929
Closed

AddParameter and target-typed new #42559

jcouv opened this issue Mar 19, 2020 · 0 comments · Fixed by #47929
Assignees
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented Mar 19, 2020

Adding an argument to an implicit object creation doesn't trigger AddParameter.

Similarly, GenerateConstructor doesn't trigger on C c = new(1, 2, 3, 4); to offer to add a constructor with 4 parameters.

class C
{
    C(int i) { }
    void M()
    {
       C c = new(1 $$); // typing a second argument here should trigger AddParameter
    }
}

Relates to #28489 (target-typed new feature)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants