Bugzilla – Bug 339392
[Flow-analysis] use of unassigned local variable not detected
Last modified: 2007-11-13 05:00:51 UTC
This should fail with "use of unassigned local variable 'c'", but doesn't. class Test { static bool Something() { return false; } static bool Moo(out Test c) { c = null; return false; } static void Main(string[] args) { Test c; if (Something() != true && Moo(out c)) { // something } Console.WriteLine("{0}", c.ToString()); } }
*** This bug has been marked as a duplicate of bug 314500 ***