Skip to content

Honor new properties on ObsoleteAttribute for .NET 5 #8654

@cartermp

Description

@cartermp

See corresponding Roslyn issue here: dotnet/roslyn#42119

namespace System
{
    public partial class ObsoleteAttribute : Attribute
    {
        // Existing:
        //
        // public ObsoleteAttribute();
        // public ObsoleteAttribute(string message);
        // public ObsoleteAttribute(string message, bool error);
        // public bool IsError { get; }
        // public string Message { get; }

        // New:
        public string DiagnosticId { get; set; }
        public string UrlFormat { get; set; }
    }
}

Handling of these properties is covered in the spec here: https://github.com/dotnet/designs/blob/master/accepted/2020/better-obsoletion/better-obsoletion.md#api-changes

The code to update is here:

let private CheckILAttributes (g: TcGlobals) isByrefLikeTyconRef cattrs m =

Tagging @terrajobst

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions