Skip to content

CustomAttributes disagrees with GetCustomAttributes on array types #133653

Description

@MichalStrehovsky
        Console.WriteLine("** CustomAttributes");
        foreach (var a in typeof(object[]).CustomAttributes)
            Console.WriteLine(a.AttributeType);
        Console.WriteLine("** End");

        Console.WriteLine("** GetCustomAttributes");
        foreach (var a in typeof(object[]).GetCustomAttributes())
            Console.WriteLine(a.GetType());
        Console.WriteLine("** End");

This will print:

** CustomAttributes
System.SerializableAttribute
** End
** GetCustomAttributes
** End

This is trivial to fix but this code is in the process of getting unified with native AOT so do not assign to copilot this year (pull requests are in flight right now and there might be more and this will be a very unnecessary merge conflict).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions