https://bugzilla.novell.com/show_bug.cgi?id=441135
Summary: Invalid weird error message with generics
Product: Mono: Compilers
Version: 1.9
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
public static IEnumerable<IEnumerable<T>> Chunk<T>(this IEnumerable<T> source,
int chunkSize)
{
return source
.Select((i, j) => new { Element = i, Index = j })
.GroupBy(i => i.Index / chunkSize, i => (T)i.Element)
.Select(i => (IEnumerable<T>)i.AsEnumerable());
}
Cannot convert type `T' to `T'(CS0030)]
The error message fails to convey much. T to T? Oh yeah.
--
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