[Mono-bugs] [Bug 441135] New: Invalid weird error message with generics

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 3 11:25:02 EST 2008


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: mono-bugs at lists.ximian.com
        ReportedBy: wasabi at larvalstage.net
         QAContact: mono-bugs at lists.ximian.com
          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.


More information about the mono-bugs mailing list