[Mono-bugs] [Bug 708024] New: csharp repl: yield return in lambda expr produces error CS1624
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Jul 25 07:54:14 EDT 2011
https://bugzilla.novell.com/show_bug.cgi?id=708024
https://bugzilla.novell.com/show_bug.cgi?id=708024#c0
Summary: csharp repl: yield return in lambda expr produces
error CS1624
Classification: Mono
Product: Mono: Compilers
Version: 2.10.x
Platform: x86
OS/Version: Windows 7
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: michael.miller at suse.com
ReportedBy: ralmoritz at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Description of Problem:
Defining an anonymous method or lambda expression containing a yield return
statement produces error CS1624.
Steps to reproduce the problem:
1. Type "Func<int, int> Decreasing = start => { for (var i = start; ; --i)
yield return i; };" at the csharp repl.
2. Notice the following error is generated: "error CS1624: The body of
`Class1.Host(ref object)' cannot be an iterator block because `void' is not an
iterator interface type"
Actual Results:
error CS1624
Expected Results:
System.Func`2[System.Int32, System.Int32]
How often does this happen?
Always
Additional Information:
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list