Open
Description
If a type contains no members for binding we shouldn't generator source for that. This includes the case where the only members it generates are references to itself.
Consider the following types:
public abstract class MySingleton
{
public static MySingleton Instance {get; set;}
}
public abstract class MyNode
{
public MyNode Next { get; set; }
}
public class MyClass
{
// all members below are excluded
public int[,] Matrix { get; set; }
public Func<string, int> ParseMethod { get; set; }
}
All have no bindable members and result in useless code gen today. It's harmless - but we should try to identify these types of things through heuristics to reduce the size of the codegen. We should inform the behavior for non-abstract instance types from the runtime binder to determine if they'll be initialized or not in these cases -- I don't think they would.