[Mono-bugs] [Bug 61907][Nor] Changed - Iterator methods can have return types other than IEnumerable and IEnumerator

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 5 Aug 2004 03:47:16 -0400 (EDT)


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 martin@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=61907

--- shadow/61907	2004-08-05 03:45:04.000000000 -0400
+++ shadow/61907.tmp.6512	2004-08-05 03:47:16.000000000 -0400
@@ -93,6 +93,20 @@
 
 ------- Additional Comments From martin@ximian.com  2004-08-05 03:44 -------
 Dammit, I start to hate bugzilla.
 
 ------- Additional Comments From martin@ximian.com  2004-08-05 03:45 -------
 Use correct resulution.
+
+------- Additional Comments From martin@ximian.com  2004-08-05 03:47 -------
+To explain this a bit, in your code,
+
+        public static IEnumerator Enumerate () 
+        {
+                yield return "Hello world!";
+        }
+
+this returns an instance of a compiler generated iterator class.
+
+There's no way the compiler can know how to implement your custom
+interface.
+