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

Submitted by:  James Michael DuPont <mdupont>
Submitted on:  Thu 30 Dec 2004 11:22:16 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 28 May 2005 07:28:44 AM UTCdrobossonStatusNone=>Wont Fix
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1