Open
Description
DynamicallyAccessedMembers annotations are not supported for arbitrary types. The ILLink analyzer normally produces IL2098 warnings when the annotations are applied to unsupported types, but this isn't working for top-level methods:
using System.Diagnostics.CodeAnalysis;
RequireAll(GetFoo());
// This should warn
static void RequireAll([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Foo f) {}
static Foo GetFoo() => new Foo();
class Foo {}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status