Bugzilla – Bug 320475
[GMCS] incorrect CS0121 - call to base overriden methods are said ambiguous
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by atsushi@ximian.com 2006-03-06 01:41:56 MST ---- gmcs is confused and reports ambiguity for call to an overriden base method among further base methods. -------- class Foo<T> { internal virtual void Hoge (T obj) { } } class Bar<T> : Foo<T> { internal override void Hoge (T obj) { } } class Baz : Bar<string> { internal override void Hoge (string obj) { base.Hoge (obj); } } Actual Results: override-override-override.cs(19,8): error CS0121: The call is ambiguous between the following methods or properties: `Foo<string>.Hoge(in string)' and `Bar<string>.Hoge(in string)' override-override-override.cs(3,24):: `Foo<T>.Hoge(T)', name of symbol related to previous error override-override-override.cs(10,25):: `Bar<T>.Hoge(T)', name of symbol related to previous error Compilation failed: 1 error(s), 0 warnings Expected Results: no CS0121 error. How often does this happen? consistently. Additional Information: It still happens when you replace "string" with a generic type argument. ---- Additional Comments From atsushi@ximian.com 2006-03-06 02:50:20 MST ---- r57569 works fine, while r57570 does not. It also seems already backported to 1-1-13 branch. Additional information: it only happens to "base" access. Having another member to call those Hoge() does not raise any errors. ---- Additional Comments From martin@ximian.com 2006-03-09 07:17:19 MST ---- . Unknown operating system unknown. Setting to default OS "Other".