This is inconsistent with other behavior around UnmanagedCallersOnly where misuse simply triggers a failfast. Consider removing this check.
Check that is inconsistent with policy.
|
// Do not allow static methods with [UnmanagedCallersOnlyAttribute] to be a delegate target. |
Commentary about this, #122656 (comment)
Test code that depends on the check
|
ldftn int32 InvalidCSharp.CallingUnmanagedCallersOnlyDirectly::ManagedDoubleCallback(int32) |