Bugzilla – Bug 324493
CS0122/CS0229 Ambiguity Error
Last modified: 2010-05-18 19:02:34 UTC
---- Reported by monkey@jpobst.com 2007-06-06 16:52:47 MST ---- csc compiles the attached code and prints "This should be printed". mcs/gmcs fail on compile with: test14.cs(26,25): error CS0229: Ambiguity between `MyClass.A.MouseClick' and `MyClass.B.MouseClick' test14.cs(7,43): (Location of the symbol related to previous error) test14.cs(26,25): error CS0122: `MyClass.C.MouseClick()' is inaccessible due to its protection level test14.cs(17,33): (Location of the symbol related to previous error) test program: using System; public class MyClass { public class A { public event EventHandler MouseClick; } public class B : A { public new event EventHandler MouseClick; } public class C : B { public new void MouseClick () { Console.WriteLine ("This should be printed"); } } static public void Main () { C myclass = new C (); myclass.MouseClick (); } } Unknown operating system unknown. Setting to default OS "Other".
Fixed in trunk.