Even though M1 below calls a method annotated RequiresDynamicCode, it does so in a code path that is not reachable at runtime when dynamic code is not supported. We should not generate a warning.
static void M1()
{
if (RuntimeFeature.IsDynamicCodeSupported)
{
M2();
}
}
[RequiresDynamicCode("...")]
static void M2()
{
}
Cc @tlakollo
Even though M1 below calls a method annotated
RequiresDynamicCode, it does so in a code path that is not reachable at runtime when dynamic code is not supported. We should not generate a warning.Cc @tlakollo