Bugzilla – Bug 317516
[GMCS] can't resolve overloaded methods that implement generic interfaces
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by atsushi@ximian.com 2005-03-22 23:31:39 MST ---- gmcs cannot resolve overloaded methods that implement different generic interfaces. Steps to reproduce the problem: Compile this example with gmcs. ---- using System; static class Test1 { public interface IOp<T> { T Func(uint v); } public struct Op : IOp<ushort>, IOp<uint> { ushort IOp<ushort>.Func(uint v) { return (ushort )(v * 2); } uint IOp<uint>.Func(uint v) { return v * 4; } } static public void Main() { } }; Actual Results: $ gmcs generic-overload.cs generic-overload.cs(7) error CS0111: Type 'Test1.Op' already defines a member called 'IOp.Func' with the same parameter types generic-overload.cs(8): 'Test1.Op.Test1+IOp`1.Func( uint)' (name of symbol related to previous error Compilation failed: 1 error(s), 0 warnings Expected Results: no error. How often does this happen? consistently. ---- Additional Comments From martin@ximian.com 2005-04-29 08:32:39 MST ---- Fixed in SVN. This bug blocked bug(s) 73995. Unknown operating system unknown. Setting to default OS "Other".