[Mono-bugs] [Bug 73820][Wis] New - Cannot compile delegates with a parameter using 'params'

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 17 Mar 2005 18:11:38 -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 eto@shaw.ca.

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

--- shadow/73820	2005-03-17 18:11:38.000000000 -0500
+++ shadow/73820.tmp.1182	2005-03-17 18:11:38.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 73820
+Product: Mono: Compilers
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: gentoo
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: eto@shaw.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Cannot compile delegates with a parameter using 'params' 
+
+Description of Problem:
+Cannot compile a program that has a delegate with a parameter 
+using 'params'.
+
+Steps to reproduce the problem:
+1. Create a delegate with a parameter using 'params'
+2. Use the delegate in a class and try to call it using multiple 
+parameters
+
+Actual Results:
+Compile errors CS1594 and CS1503 are generated
+
+Expected Results:
+Should compile fine.
+
+How often does this happen? 
+Every time
+
+Additional Information:
+Test sample:
+
+public delegate void MyFunnyDelegate(object sender, params object[] 
+message);
+
+public class MyClass
+{
+    public event MyFunnyDelegate DoSomething;
+
+    public void DoSomethingFunny()
+    {
+        if (DoSomething != null) DoSomething(this, "hello there", "my 
+friend");
+    }
+}