Skip to content

Unexpected/misleading IDE diagnostics for a user defined assignment operator declaration #78279

@AlekseyTs

Description

@AlekseyTs
class C1
{
    // CA1822 Member 'op_Increment' does not access instance data and can be marked as static
    public void operator ++() 
    {
    }

    // CA1822 Member 'op_SubtractionAssignment' does not access instance data and can be marked as static
    // IDE0060 Remove unused parameter 'i'
    public void operator -=(int i)
    {
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    InQueue

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions