[Mono-bugs] [Bug 37544][Nor] New - Wrong EndInvoke signature for delegates
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Mon, 3 Feb 2003 12:04:01 -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 gonzalo@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=37544
--- shadow/37544 Mon Feb 3 12:04:01 2003
+++ shadow/37544.tmp.20170 Mon Feb 3 12:04:01 2003
@@ -0,0 +1,49 @@
+Bug#: 37544
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gonzalo@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Wrong EndInvoke signature for delegates
+
+This program:
+---------------
+using System;
+
+class Test
+{
+ delegate int D (int x, out int y);
+
+ static int M (int x, out int y)
+ {
+ y = x + 2;
+ return ++x;
+ }
+
+ static void Main ()
+ {
+ int x = 1;
+ int y = 0;
+
+ D del = new D (M);
+ IAsyncResult ar = del.BeginInvoke (x, out y, null, null);
+ Console.WriteLine ("x: {0} y: {1}", del.EndInvoke (out y, ar), y);
+ }
+}
+------------
+
+Does not compile with mcs. The problem is that the EndInvoke method
+generated does not include the ref/out parameters present in the delegate
+signature.
+
+You can find another test case in remoting3.cs