Bugzilla – Bug 317481
[PATCH] Cannot compile delegates with a parameter using 'params'
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by eto@shaw.ca 2005-03-17 18:11:37 MST ---- 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"); } } ---- Additional Comments From miguel@ximian.com 2005-03-17 20:13:44 MST ---- This works with Mono SVN HEAD. ---- Additional Comments From eto@shaw.ca 2005-03-18 21:31:59 MST ---- Created an attachment (id=167596) Test to reproduce the problem with mono svn head ---- Additional Comments From eto@shaw.ca 2005-03-18 21:33:47 MST ---- Hm, it seems this only happens when the delegate is defined in a separate assembly (like the code I'm trying to compile). I have tested with mono svn head, and still has the problem. The attached test will reproduce the problem correctly. Sorry for the confusion. ---- Additional Comments From projectmonokochi@rediffmail.com 2005-04-04 11:53:11 MST ---- Created an attachment (id=167597) emit 'param' modifiers ---- Additional Comments From rharinath@novell.com 2005-04-05 12:50:12 MST ---- Applied to SVN. Imported an attachment (id=167596) Imported an attachment (id=167597) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>gentoo</cf_op_sys_details>