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

Collection expressions: inapplicable overloads considered in overload resolution #69634

Closed
cston opened this issue Aug 21, 2023 · 1 comment · Fixed by #69627
Closed

Collection expressions: inapplicable overloads considered in overload resolution #69634

cston opened this issue Aug 21, 2023 · 1 comment · Fixed by #69627

Comments

@cston
Copy link
Member

cston commented Aug 21, 2023

Version Used: d838fac

Steps to Reproduce:

F([1, 2, 3]) below is reported as ambiguous, even though only one overload is applicable.

class Program
{
    static void F(string[] arg) { }

    static void F(int[] arg) { }

    static void Main()
    {
        F([1, 2, 3]); // error CS0121: ambiguous between 'F(string[])' and 'F(int[])'
    }
}

Expected Behavior:
Compiles successfully.

Relates to test plan #66418

Actual Behavior:
Error reported: error CS0121: ambiguous between 'F(string[])' and 'F(int[])'

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 21, 2023
@cston cston self-assigned this Aug 21, 2023
@jcouv jcouv added this to the 17.8 milestone Aug 22, 2023
@jcouv jcouv removed the untriaged Issues and PRs which have not yet been triaged by a lead label Aug 22, 2023
@cston
Copy link
Member Author

cston commented Aug 30, 2023

Fixed in #69627.

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.

2 participants