Skip to content

InternalImplementationOnlyAttribute documentation is incorrect #219

@gafter

Description

@gafter

According to its specification, the type should be defined

namespace System.Runtime.CompilerServices
{
    /// <summary>
    /// Indicates that the interface may be implemented only by a type in the same assembly
    /// as the attributed interface or a type in an assembly that has InternalsVisibleTo the
    /// attributed interface's assembly.
    /// </summary>
    [AttributeUsage(AttributeTargets.Interface)]
    public class InternalImplementationOnlyAttribute : Attribute
    {
        public InternalImplementationOnlyAttribute() { }
    }
}

But the documentation of the actual type as checked in incorrectly implies that there is a constraint on the accessibility of implementations:

namespace System.Runtime.CompilerServices
{
    /// <summary>
    /// This is a marker attribute that can be put on an interface to denote that only internal implementations
    /// of that interface should exist.
    /// </summary>
    [AttributeUsage(AttributeTargets.Interface, AllowMultiple = false)]
    internal sealed class InternalImplementationOnlyAttribute : Attribute
    {
    }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions