This simple C# method becomes non compilable when the final return statement is removed. Why? I would say that the switch is complete and thus the final return is unreachable.
private static object Convert(bool? predicate)
{
switch (predicate)
{
case false: return null;
case true: return null;
case null: return null;
}
return null;
}
EDIT: I'm using C# 7.3 That's probably the reason why.