ILLink: Trim analyzer doesn't warn on reflection access to annotated members when the source of the Type
is GetType on a DAM-annotated class
#102002
Labels
area-Tools-ILLink
.NET linker development as well as trimming analyzers
in-pr
There is an active PR which will close this issue when it is merged
Milestone
The following code in
Test()
should cause warnings to appear onMethodWithDataflow
andMethodWithRequires
becauseo
is known to beDamOnTypeAccessesMembers
which is annotated with DAMT.All, and is passed toRequiresAll
, enforcing the requirement. The analyzer should recognize the pattern of Object.GetType() on a statically known type with DAM on the type.Related to #93720
The text was updated successfully, but these errors were encountered: