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: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
CC: [EMAIL PROTECTED]
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs