[Mono-bugs] [Bug 416090] New: CS0103(name does not exists) error is produced when a variable declared in LING used in anonymous method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Aug 9 22:54:32 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=416090


           Summary: CS0103(name does not exists) error is produced when a
                    variable declared in LING used in anonymous method
           Product: Mono: Compilers
           Version: 1.9
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: apk6 at cornell.edu
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=232579)
 --> (https://bugzilla.novell.com/attachment.cgi?id=232579)
Source code that demonstrate the bug

Compiler does not allow to use a variable declared using the "from" expression
in the anonymous method or lambda expression. E.g.:

 var good=from x in a
          where b.All(y=>y%x==0)
          select x;

Compiling this code produces an error:
Main.cs(7,51): error CS0103: The name `x' does not exist in the current context

To reproduce this error compile the attachment with
  gmcs Main.cs


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