[Mono-bugs] [Bug 471213] New: Base class method isn't called when triggered by extending class (passed as argument to base class) event
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jan 30 17:42:32 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=471213
Summary: Base class method isn't called when triggered by
extending class (passed as argument to base class)
event
Classification: Mono
Product: Mono: Compilers
Version: 2.2.x
Platform: i686
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: pmgration at yahoo.com
QAContact: mono-bugs at lists.ximian.com
Found By: Community User
Description of Problem:
Steps to reproduce the problem:
1. Compile the following using Mono:
// Inheritee.cs
using System;
public abstract class Inheritee
{
public abstract event EventHandler Finished;
public Inheritee()
{
}
public void test(Inheritee inheritee)
{
inheritee.Finished += inheriteeTest;
}
public void inheriteeTest(object sender, EventArgs e)
{
Console.WriteLine("Inheritee test method.");
}
}
// Inheritor.cs
using System;
public class Inheritor : Inheritee
{
public override event EventHandler Finished;
public Inheritor()
{
Finished += this.inheritorTest;
this.test(this);
Finished(this, EventArgs.Empty);
Console.WriteLine("Press any key to exit..");
Console.ReadKey(true);
}
public void inheritorTest(object sender, EventArgs e)
{
Console.WriteLine("Inheritor test method.");
}
public static void Main()
{
new Inheritor();
}
}
Actual Results:
Only "Inheritor test method." is displayed in console.
Expected Results:
Both "Inheritor test method." and "Inheritee test method." should be displayed.
How often does this happen?
Every time
Additional Information:
Tested using Mono 1.9x, 2.2x on Ubuntu and Gentoo respectively and 2.2x on
Windows.
When compiling on Windows using .NET 3.5 compiler (csc) the expected results
are shown correctly. (Not tested on any .NET versions prior to 3.5
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list