Bug 317481 (MONO73820) - [PATCH] Cannot compile delegates with a parameter using 'params'
Summary: [PATCH] Cannot compile delegates with a parameter using 'params'
Status: RESOLVED FIXED
Alias: MONO73820
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Linux
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: daMONOguyz
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2005-03-18 01:11 UTC by Curtis
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Test to reproduce the problem with mono svn head (580 bytes, application/octet-stream)
2005-03-19 04:31 UTC, Thomas Wiest
Details
emit 'param' modifiers (2.12 KB, patch)
2005-04-04 18:53 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:10:58 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>