https://bugzilla.novell.com/show_bug.cgi?id=378189
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=378189#c5 --- Comment #5 from Casey Marshall <[EMAIL PROTECTED]> 2008-07-06 13:41:45 MDT --- The exact issue is in lambda.cs, ContextualReturn.DoResolve. If the expression is an invocation, and the containing context resolves to `void', it explicitly tests if the return type of the invocation is `void'. I believe this is incorrect, though it does resolve another bug (Bug 370577), where resolving same-named methods fails -- this happens to resolve that bug because one of the methods in the test case takes an Action<T>, and thus would require a void expression, which the lambda method doesn't match. From the test case, it's obvious that only one `Foo' method is appropriate, since it's being called where it is returning a value (of type string). It's a problem of overload resolution given that one of the methods is generic. The implementation also now seems to contradict the comments above that class describing its purpose: that a contextual return behaves as either `return expr()' or as `expr(); return;', depending on the containing context. -- 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 - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs