A silly but probably not-so-uncommon error when I replaced a string literal by a static string was leading to something like the following code snippet which is probably almost never intended and trivial to spot, even for a machine:
public partial class T { static string S = S; }
This doesn't trigger a diagnostic with VS Professional 2013, .NET Framework 4.6.0.1055, Warning level 4.1 Why not?
1To be fair with the compiler I assume that the initialization is well defined and assigns
S
' value in its default value state prior to the explicit initialization, i.e. null, to itself when the initialization is eventually performed; but it is almost certainly a coding error.