Skip to content

GetTypeInfo() should return the inferred delegate type for method groups #52874

@cston

Description

@cston

GetTypeInfo() should return the inferred delegate type for method groups - for the initializer of d1 for instance.

What should GetTypeInfo() return for the initializer of d2 since we don't need to infer a delegate type for that expression?

using System;

delegate void D();

class Program
{
    static void Main()
    {
        Delegate d1 = Main; // System.Action
        D d2 = Main;        // D?
    }
}

Relates to "lambda improvements" feature (test plan)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions