https://bugzilla.novell.com/show_bug.cgi?id=441134
Summary: Lambda types not figured out properly.
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<T> FirstInGroup<T,K>(this IEnumerable<T> self,
Func<T,K> selector)
{
#if !MONO // Cannot convert `lambda expression' to delegate type
`System.Func<System.Linq.IGrouping<K,T>,T>' because some of the return types in
the block are not implicitly convertible to the delegate return type(CS1662)]
return self.GroupBy(selector).Select(g => g.First());
#else
return self.GroupBy(selector).Select((IGrouping<K,T> g)
=> ((IGrouping<K, T>)g).First<T>());
#endif
}
That example illustrates the issue. Looks like the lambda passed to .Select is
just interpreted incorrectly. Mono 1.9.1.
--
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