Open
Description
The trim analyzer hasn't been tested with new C# 14 features to make sure it doesn't crash, report incorrect warnings, or miss warnings.
One issue is the analyzer doesn't recognize the 'field' keyword, and gives it UnknownValue for a dataflow value, resulting in a warning for the following code:
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)]
static Type MyType { get => field; } // Value returned from method 'MyType.get' can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements.
https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-14
Metadata
Metadata
Assignees
Type
Projects
Status
No status