It would be nice if the analyzer could warn on DynamicallyAccessedMembers annotations that preserve more than is necessary. This would be hard to do when a Type "escapes" to an annotated field, but sounds reasonable at least when the dataflow only involves annotated method parameters.
Context: https://github.com/dotnet/runtime/pull/109772#issuecomment-2474856235
It would be nice if the analyzer could warn on DynamicallyAccessedMembers annotations that preserve more than is necessary. This would be hard to do when a Type "escapes" to an annotated field, but sounds reasonable at least when the dataflow only involves annotated method parameters.
This would help move away from
DynamicallyAccessedMembers.All
annotations to the less broad annotations added for https://github.com/dotnet/runtime/issues/88512.