Skip to content

IDISP010 False warning when base method is abstract #575

Open
@Emik03

Description

@Emik03

Classes like the standard library's MemoryManager<T> have an abstract dispose method, which cannot be called despite the lint asking for it to be invoked.

sealed class Manager : MemoryManager<byte>
{
    /// <inheritdoc />
    public override void Unpin() { }

    /// <inheritdoc />
    public override unsafe MemoryHandle Pin(int elementIndex = 0) => default;

    /// <inheritdoc />
    public override unsafe Span<byte> GetSpan() => default;

    /// <inheritdoc />
    protected override void Dispose(bool disposing) { } // <-- lint occurs here
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions