Can somebody tell me why compiler thinks that break
is necessary after yield return
in the following code?
foreach (DesignerNode node in nodeProvider.GetNodes(span, node => node.NodeType != NDjango.Interfaces.NodeType.ParsingContext))
{
switch (node.ErrorMessage.Severity)
{
case -1:
case 0:
continue;
case 1:
yield return new TagSpan<ErrorTag>(node.SnapshotSpan, new ErrorTag(PredefinedErrorTypeNames.Warning));
break;
default:
yield return new TagSpan<ErrorTag>(node.SnapshotSpan, new ErrorTag(PredefinedErrorTypeNames.SyntaxError));
break;
}
}