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

No error reported for duplicate ref in lambda signature #62085

Closed
cston opened this issue Jun 22, 2022 · 3 comments
Closed

No error reported for duplicate ref in lambda signature #62085

cston opened this issue Jun 22, 2022 · 3 comments
Assignees
Milestone

Comments

@cston
Copy link
Member

cston commented Jun 22, 2022

No errors are reported for lambda signatures below:

delegate void D(ref int i);

class Program
{
    static void Main()
    {
        D d1 = (ref ref int i) => { };
        D d2 = (in ref int i) => { };
        D d3 = (out ref int i) => { };
    }
}
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 22, 2022
@Youssef1313
Copy link
Member

The error for other symbols come from

public static ImmutableArray<ParameterSymbol> MakeParameters(

But it looks like lambdas have their own MakeParameters:

private ImmutableArray<ParameterSymbol> MakeParameters(

@cston
Copy link
Member Author

cston commented Jun 22, 2022

But it looks like lambdas have their own MakeParameters:

Yes, thanks. I'm changing Binder.AnalyzeAnonymousFunction() to use ParameterHelpers.CheckModifiers() and ParameterHelpers.GetModifiers().

@cston cston self-assigned this Jun 22, 2022
@jcouv jcouv added Bug and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 24, 2022
@jcouv jcouv added this to the C# 11.0 milestone Jun 24, 2022
@jaredpar jaredpar modified the milestones: C# 11.0, 17.4 Jun 24, 2022
@cston
Copy link
Member Author

cston commented Jun 27, 2022

Fixed in #62155.

@cston cston closed this as completed Jun 27, 2022
@cston cston modified the milestones: 17.4, 17.3 Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants