Skip to content

Automatic fix for RS0016 removes exetension methods declared using new syntax. #7798

@otac0n

Description

@otac0n

The automatic fix for RS0016 keeps removing the public API for the .NET 10 style extension members.

Image

e.g.

    /// <summary>Extensions for vectors with elements implementing <see cref="IRootFunctions{TSelf}"/>.</summary>
    extension<T>(Vector2D<T> vector)
        where T : IRootFunctions<T>
    {
        /// <summary>Gets the length of the vector.</summary>
        public T Length => T.Sqrt(vector.LengthSquared);
    }

    /// <summary>Extensions for vectors with elements implementing <see cref="INumberBase{TSelf}"/>.</summary>
    extension<T>(Vector2D<T> vector)
        where T : INumberBase<T>
    {
        /// <summary>Gets the length squared of the vector.</summary>
        public T LengthSquared => Vector2D.Dot(vector, vector);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions