[Mono-bugs] [Bug 441134] New: Lambda types not figured out properly.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Nov 3 11:23:13 EST 2008
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: mono-bugs at lists.ximian.com
ReportedBy: wasabi at larvalstage.net
QAContact: mono-bugs at lists.ximian.com
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.
More information about the mono-bugs
mailing list