[Mono-bugs] [Bug 82624][Nor] New - Missing CS1622 for return from iterator
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Aug 29 09:59:02 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by marek.safar at seznam.cz.
http://bugzilla.ximian.com/show_bug.cgi?id=82624
--- shadow/82624 2007-08-29 09:59:02.000000000 -0400
+++ shadow/82624.tmp.333 2007-08-29 09:59:02.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 82624
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: marek.safar at seznam.cz
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Missing CS1622 for return from iterator
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+
+using System.Collections;
+
+public class C
+{
+ internal static IEnumerable PrivateBinPath
+ {
+ get {
+ string a = "a";
+ if (a == null)
+ return false;
+ yield return a;
+ }
+ }
+
+}
+
+Actual Results:
+
+No error.
+
+Expected Results:
+
+?.cs(11,13): error CS0029: Cannot implicitly convert type `bool' to
+ `System.Collections.IEnumerable'
+?.cs(11,6): error CS1622: Cannot return a value from an iterator. Use the
+yield return statement to return a value, or yield break to end the iteration
+
+How often does this happen?
+
+
+Additional Information:
More information about the mono-bugs
mailing list