[Mono-bugs] [Bug 74999][Maj] Changed - Invalid IL code with anonymous method/variable interaction

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jun 21 17:04:55 EDT 2005


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=74999

--- shadow/74999	2005-05-19 21:59:26.000000000 -0400
+++ shadow/74999.tmp.4072	2005-06-21 17:04:55.000000000 -0400
@@ -56,6 +56,32 @@
 Aborted
 
 
 This error does not occur if I comment out either "o.eh = false;" or
 "running = false;" in the anonymous method.  (Or if I comment out both, of
 course.)
+
+------- Additional Comments From miguel at ximian.com  2005-06-21 17:04 -------
+A simpler program:
+
+class X {
+	public bool eh;
+}
+
+static class Program {
+	delegate void D (X o);
+	static event D E;
+	
+	static void Main()
+	{
+		bool running = true;
+
+		E = delegate(X o) {
+			o.eh = false;
+			running = false;
+		};
+
+		running = true;
+		
+	}
+}
+


More information about the mono-bugs mailing list