[Mono-bugs] [Bug 369670] New: [LINQ] Range varibles use parent scope

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 12 06:11:10 EDT 2008


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


           Summary: [LINQ] Range varibles use parent scope
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
                CC: vvaradhan at novell.com
          Found By: ---


using System;
using System.Collections.Generic;
using System.Linq;

namespace Test
{
        class Data
        {
                public int Value;
        }

        static class Ex
        {
                public static IEnumerable<TR> Foo<T, TR> (this IEnumerable<T>
t, Func <T, TR> f)
                {
                        return null;
                }
        }

    public class AdvancedTest
    {
        public static void Main ()
        {
                        Data[] i = new Data[0];

                        var prods = from pe in i.Foo(pe => pe.Value)
                                        where pe > 0 select pe;

        }
    }
}


Actual:

bug.cs(26,42): error CS1931: A range variable `pe' conflicts with a previous
declaration of `pe'
bug.cs(26,54): (Location of the symbol related to previous error)


Expected: No error


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