Skip to content

[API Compat] Ensure strict mode finds override removals #24390

@ericstj

Description

@ericstj

Today we don't complain if an override is removed, even in strict mode, but we should. Removal of an override is binary compatible, but when folks are running in "strict" mode we should flag that. Overrides are relevant at compile time in non-sealed types since the compiler uses them when emitting calls to base.member.

// If method is an override or is promoted to the base type should not be reported.
if (method.IsOverride || FindMatchingOnBaseType(method, containingType))
return false;

See dotnet/arcade#2570

Repro: lib.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions