bugDotGNU Portable.NET - Bugs: bug #11454, BOGUS: incompatible types in event...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11454: BOGUS: incompatible types in event addition

Submitter:  James Michael DuPont <mdupont>
Submitted:  Thu 30 Dec 2004 11:22:16 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Sat 28 May 2005 07:28:44 AM UTC, comment #4: 

What was provided as the test case is in fact incorrect for a multicast delegate.  What follows is a quick sample (albeit a little incomplete for parameters).

using System;

class test
{
        delegate void fooDel();

        public void test()
        {
                fooDel bar = new fooDel(foo2);
                bar += new fooDel(foo);
        }

        void foo2()
        {
        }

        void foo()
        {
        }

        static void Main()
        {
                test te = new test();
        }
}

Deryk Robosson <drobosson>
Group Member
Thu 30 Dec 2004 01:00:26 PM UTC, comment #3: 

According to the hackers in #mono, <alexmipego> and <jonp>
this is a feature of mono that implments c# v2 features. 
anonymous delegate support is the name of the feature.
i guess this is then a feature request, it looks like an better error message would be in order, that would advise people that this is a c# v2 feature that is not supported yet.

James Michael DuPont <mdupont>
Thu 30 Dec 2004 11:51:05 AM UTC, comment #2: 

Well, it turns out that this might be something that is allowed in mono (rightly or wrongly) that does not work in pnet.  It is therefore good to have this in the pnet bug system so that other people who are porting from mono to pnet will know about this issue.

There is code in frege http://www.netalleynetworks.com/community/jgeldart/research/frege/Frege-0.1.0.tar.gz
that needs to be changed to compile on pnet :

-                    Driver.ServiceOwnerChanged += OnServiceOwnerChanged;
+                    Driver.ServiceOwnerChanged += new BusDriver.ServiceEventHandler(OnServiceOwnerChanged);

I will see if this is a bug in mono. Or if this is a new feature of .net2 that has not been implemented yet in pnet.

mike

James Michael DuPont <mdupont>
Thu 30 Dec 2004 11:27:49 AM UTC, comment #1: 

This is not a bug.
was my fault, here is the good code.
public class  TEST {
public TEST()
{}
public delegate void foo ();
public virtual event  foo boo;
}
class test
{
void foo2()
{}
void foo3()
{
    TEST foo;
    foo.boo += new TEST.foo(foo2);
}
}

James Michael DuPont <mdupont>
Thu 30 Dec 2004 11:22:16 AM UTC, original submission:  

//I dont know if this is a bug, please advise.
testcase1.cs:13: incompatible types in event addition: 'void' to 'TEST.foo'
public class  TEST {
public delegate void foo ();
public virtual event  foo boo;
}
class test
{
void foo2()
{}
void foo()
{
    TEST foo;
       foo.boo += foo2; // BUG incompatible types in event addition: 'void' to 'TEST.foo'
}
}

James Michael DuPont <mdupont>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-28 drobosson StatusNone Wont Fix
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code