-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzers
Milestone
Description
We currently keep the M method for this even though it's provably unreachable - we intend to keep it because of a object.GetType call but the instance was never allocated so object.GetType would never return C.
using System.Diagnostics.CodeAnalysis;
class Program
{
private static C _inst;
public static void Main()
{
if (_inst != null)
RequirePublicMethods(_inst.GetType());
}
public static void RequirePublicMethods([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type t) { }
}
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)]
class C
{
public void M() { }
}Sergio0694
Metadata
Metadata
Assignees
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzers
Type
Projects
Status
No status