The initializers for d1 and d2 should be equivalent. Currently, the initializer for d2 is interpreted as ref (int () => x) and is reported as an error.
delegate ref int D();
class Program
{
static void Main()
{
D d1 = (ref int () => x);
D d2 = ref int () => x;
}
}
See LDM notes.