[Mono-bugs] [Bug 613713] New: Compiler misses error CS0165 (Use of unassigned local variable)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jun 11 16:05:29 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=613713

http://bugzilla.novell.com/show_bug.cgi?id=613713#c0


           Summary: Compiler misses error CS0165 (Use of unassigned local
                    variable)
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: joncham at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:
FYI, this stops us from compiling our System.dll with CSC. As of r158840 I get:
System.Net\HttpListenerRequest.cs(152,8): error CS0165: Use of unassigned local
variable 'raw_uri'


Steps to reproduce the problem:
1. Sample code below


Actual Results:
No error

Expected Results:
CS0165.cs(13,42): error CS0165: Use of unassigned local variable 'val'


using System;

public class TestCS0165
{
    public static int Main(string[] args)
    {
        TestCS0165 val;
        if (First() && Second(out val))
        {
            Console.WriteLine("Hello");
        }

        Console.WriteLine("Goodbye {0}", val);

        return 0;
    }

    static bool First()
    {
        return false;
    }

    static bool Second(out TestCS0165 val)
    {
        val = new TestCS0165();
        return true;
    }
}

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list