Bug 339392 - [Flow-analysis] use of unassigned local variable not detected
Summary: [Flow-analysis] use of unassigned local variable not detected
Status: RESOLVED DUPLICATE of bug 314500
Alias: None
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P5 - None : Minor
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-05 22:50 UTC by Theo Zourzouvillys
Modified: 2007-11-13 05:00 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Theo Zourzouvillys 2007-11-05 22:50:04 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());
    }

  }
Comment 1 Raja Harinath 2007-11-13 05:00:51 UTC

*** This bug has been marked as a duplicate of bug 314500 ***