[Mono-bugs] [Bug 69614][Nor] Changed - mcs crash when using anonymous delegate

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 7 Jan 2005 12:12:49 -0500 (EST)


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 danw@novell.com.

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

--- shadow/69614	2005-01-06 01:30:35.000000000 -0500
+++ shadow/69614.tmp.9182	2005-01-07 12:12:49.000000000 -0500
@@ -1,13 +1,13 @@
 Bug#: 69614
 Product: Mono: Compilers
 Version: 1.1
 OS: unknown
 OS Details: 
-Status: RESOLVED   
-Resolution: FIXED
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: danw@novell.com               
 QAContact: mono-bugs@ximian.com
@@ -43,6 +43,34 @@
 Parameter capturing is missing from mcs/anonymous method implementation.
 
 ------- Additional Comments From miguel@ximian.com  2005-01-06 01:30 -------
 This was a simple bug, its fixed now.
 
 I was confused, this did not involve parameter capturing.
+
+------- Additional Comments From danw@novell.com  2005-01-07 12:12 -------
+Hm... that fixes some of my problems, but not others. For instance,
+if you add an "if" around the event handler assignment, mcs still
+crashes:
+
+using System;
+
+class Delegable {
+	public event EventHandler MyDelegate;
+}
+
+class DelegateTest {
+	static void Main (string[] argv)
+	{
+		Console.WriteLine ("Test");
+
+		Delegable db = new Delegable ();
+		if (argv.Length > 1) {
+			db.MyDelegate += delegate (object o, EventArgs args) {
+				Console.WriteLine ("{0}", argv);
+				Console.WriteLine ("{0}", db);
+			};
+		}
+	}
+}
+
+