Version Used:
Steps to Reproduce:
public delegate void DoSomething();
public class Code
{
private Action _f;
public Code(DoSomething f)
{
Action doNothing = (() => {});
_f = f ?? (DoSomething)doNothing;
// error: cannot convert between Action and DoSomething
// explicit cast between Action and DoSomething redundant
}
}
Expected Behavior:
Should be able to assign or cast matching signature Action/Func to delegate
Actual Behavior:
Get conflicting messages about not being able to convert and the cast being redundant.
Cannot compile.
Version Used:
Steps to Reproduce:
Expected Behavior:
Should be able to assign or cast matching signature Action/Func to delegate
Actual Behavior:
Get conflicting messages about not being able to convert and the cast being redundant.
Cannot compile.