Closed sbomer closed 2 months ago
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas See info in area-owners.md if you want to be subscribed.
Author: | sbomer |
---|---|
Assignees: | - |
Labels: | `area-TypeSystem-coreclr`, `untriaged`, `area-NativeAOT-coreclr`, `area-Tools-ILLink` |
Milestone: | - |
When a type provides an interface implementation via a base method, there can be new unexpected trim analysis warnings pointing to the base method. For example:
This code is fine on its own, and produces no trim analysis warnings. Now if another piece of code has:
this causes a new warning to appear at Base.M:
In general, the derived class could be defined in another assembly, leading to trim warnings that "blame" a correctly annotated assembly. The warning should instead point to
Derived
, similar to what happens if there's a mismatch in the base/interface signatures:ILLink, NativeAot, and the ILLink Roslyn analyzer all share the problematic behavior.