[Mono-bugs] [Bug 78741][Nor] Changed - [GMCS] Generic anon. delegates - runtime error.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Oct 7 11:59:44 EDT 2006


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 miguel at ximian.com.

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

--- shadow/78741	2006-07-21 10:45:26.000000000 -0400
+++ shadow/78741.tmp.9283	2006-10-07 11:59:44.000000000 -0400
@@ -165,6 +165,31 @@
 
         static void Main ()
         { }
 }
 =====
 
+
+------- Additional Comments From miguel at ximian.com  2006-10-07 11:59 -------
+The first sample does nto compile;  The second does, and runs well.
+
+I have updated it, and this also runs:
+
+using System;
+
+public class Binders {
+        public delegate void Test ();
+
+        public static void Hello<U> (U u)
+        { Console.WriteLine (u);}
+
+        public static Test Bind<T> (T t)
+        {
+                return delegate () {
+                        Hello (t);
+                };
+        }
+
+        static void Main ()
+        { Test t =  Bind<int> (5); t ();}
+}
+


More information about the mono-bugs mailing list