You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the caching for MarkEntireType, we aren't producing warnings for all callsites:
usingSystem;usingSystem.Diagnostics.CodeAnalysis;usingDAM=System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute;usingRUC=System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute;publicclassProgram{publicstaticvoidMain(){Test1();Test2();}staticvoidTest1()=>RequireAll(typeof(Foo));// warnsstaticvoidTest2()=>RequireAll(typeof(Foo));// no warningstaticvoidRequireAll([DAM(DynamicallyAccessedMemberTypes.All)]Typet){}}publicclassFoo{[RUC("RUC")]voidMethod(){}}
NestedTypes annotations will have similar problems.
The text was updated successfully, but these errors were encountered:
* Fix warnings for DAM.All
Fixes#2159
* Add tests
* PR feedback
- Remove unnecessary helper
* Avoid redundant DAM warnings for base members
* PR feedback
- Resolve -> TryResolve
- Avoid nested yield returns
- Testcases with base instantiated over self for generic parameter with
requirements
agocke
pushed a commit
to dotnet/runtime
that referenced
this issue
Nov 16, 2022
* Fix warnings for DAM.All
Fixesdotnet/linker#2159
* Add tests
* PR feedback
- Remove unnecessary helper
* Avoid redundant DAM warnings for base members
* PR feedback
- Resolve -> TryResolve
- Avoid nested yield returns
- Testcases with base instantiated over self for generic parameter with
requirements
Commit migrated from dotnet/linker@d8b94bd
Due to the caching for
MarkEntireType
, we aren't producing warnings for all callsites:NestedTypes
annotations will have similar problems.The text was updated successfully, but these errors were encountered: