[Mono-bugs] [Bug 561956] New: gmcs-csc incompatibility in lambda assignment to a variable

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Dec 9 14:13:26 EST 2009


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

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


           Summary: gmcs-csc incompatibility in lambda assignment to a
                    variable
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: bojanr at brandeis.edu
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.30 Safari/532.5

gmcs will happily compile the attached code, producing an executable which
throws a StackOverflow after a while (as expected). However, csc from .NET 3.5
SP1 will not compile it, giving this error:

test.cs(6,20): error CS0165: Use of unassigned local variable 'a'

Assigning a null to a first, then assigning the lambda works on csc as
expected.



Reproducible: Always

Steps to Reproduce:
1. Download the attached sample
2. Try to compile with gmcs and csc
Actual Results:  
gmcs compiles, csc errors out.

Expected Results:  
gmcs and csc should both error out.

-- 
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