Skip to content

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Aug 18, 2025

Fixes #108507

The fix was unfortunately complicated by the fact that we need to distinguish between warnings on the type due to:

  1. Generic mismatch
  2. Annotated attribute on the type
  3. DynamicallyAccessedMembers annotations on the type

All currently go through a shared helper to see whether a warning should be suppressed due to RUC, but with this change we only want it to be suppressed for 1).

Ideally my preference would be to uniformly treat Requires on type as suppressing warnings from the type, including warnings for attributes applied to the type. But that would require a different warning model for attributes (#108501).

@github-actions github-actions bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Aug 18, 2025
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Aug 18, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/illink
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect IL2026 for [RequiresUnreferencedCode] on type deriving from A<B> where B has new() in A<T> definition
1 participant