Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
ParserDelegateCache.Get
method body suppresses trim analysis warnings with the following justification:
aspnetcore/src/Components/Components/src/BindConverter.cs
Lines 1859 to 1867 in 98ee502
This is a lie. At minimum, the following code:
aspnetcore/src/Components/Components/src/BindConverter.cs
Lines 1985 to 1990 in 98ee502
is doing MakeGenericMethod on a method that is annotated. I don't see anything obvious that would ensure this invariant holds:
Trim warning suppressions:
- Should be reviewed with the same level of suspicion as
unsafe
. Assume it's a bug unless proven otherwise. - Should never be used on a 130 line method that does tons of reflection. Extract the suppressed block to a small helper method and suppress there.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response