[Mono-bugs] [Bug 648464] New: CSC incompatibility: Use of initialized variable not caught

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Oct 21 16:38:21 EDT 2010



           Summary: CSC incompatibility: Use of initialized variable not
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.8.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: brajkovic at comcast.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us)
AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5

The following code compiles under gmcs/dmcs, but doesn't compile under csc:

using System;

class Test {
  public static void Main (string[] args) {
    Action a = () => a ();

csc produces the following error: test.cs(5,20): error CS0165: Use of
unassigned local variable 'a'
gmcs compiles it just fine.

Reproducible: Always

Steps to Reproduce:
1. Try to compile above code.

Actual Results:  
Code compiles, no errors.

Expected Results:  
Code doesn't compile, raises error CS0165.

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