[Mono-bugs] [Bug 386628] New: Wrong error reported by compiler ( should give advice about 'out' keyword)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 5 05:56:02 EDT 2008


           Summary: Wrong error reported by compiler (should give advice
                    about 'out' keyword)
           Product: Mono: Compilers
           Version: 1.9.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: aaragoneses at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Code snippet:

using System;

namespace atkSharpHelloWorld
        public class Test
                public Test ()
                        int os;
                        TestMethod (os);
                        Console.WriteLine (os);

                public void TestMethod (out int os)
                        os = 3;

Current results:
Error: [Use of unassigned local variable `os'(CS0165)]

Expected results (errors reported by csc):
//Error 1       The best overloaded method match for
'atkSharpHelloWorld.Test.TestMethod(out int)' has some invalid arguments
//Error 2       Argument '1' must be passed with the 'out' keyword

Configure bugmail: https://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