Bugzilla – Bug 319927
[GMCS] CS0102 incorrectly reported during explicit implementation of two instancrs of the same generic interface
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by gael@fraiteur.net 2005-12-29 16:36:44 MST ---- Description of Problem: -------------------------- The error CS0102 is reported if a class implements explicitely two instances of the same generic interface (with other generic parameters), when this instance has an event. Steps to reproduce the problem: --------------------------------- Compile the attached file using "gmcs TestEventDuplicateInterfaceImplementation.cs" Actual Results: ------------------ TestEventDuplicateInterfaceImplementation.cs(14,43): error CS0102: The type `MyClass' already contains a definition for `MyEvent' TestEventDuplicateInterfaceImplementation.cs(8,49):: `MyClass.IMyInterface`1.MyEvent', name of symbol related to previous error Compilation failed: 1 error(s), 0 warnings Expected Results: ------------------ Should compile (the MS compiler does). How often does this happen? ----------------------------- Always Additional Information: ---- Additional Comments From gael@fraiteur.net 2005-12-29 16:37:12 MST ---- Created an attachment (id=169024) Test case ---- Additional Comments From martin@ximian.com 2006-01-18 12:39:11 MST ---- interface IMyInterface<T> { event EventHandler MyEvent; } public class MyClass: IMyInterface<string>, MyInterface<int> { event EventHandler IMyInterface<string>.MyEvent { add {} remove {} } event EventHandler IMyInterface<int>.MyEvent { add {} remove {} } } ---- Additional Comments From martin@ximian.com 2006-01-18 13:13:58 MST ---- Fixed in SVN. Imported an attachment (id=169024) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Fedora FC4 x64</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".