Bugzilla – Bug 320440
[GMCS] incorrect CS0534: gmcs fails to resolve generic method that returns generic argument in abstract class
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by atsushi@ximian.com 2006-03-01 02:24:38 MST ---- gmcs does not mark 1)overriden methods 2)whose return type is a generic argument 3)and defined in an abstract class, as actually overriden. -------- using System; public abstract class A { public abstract T Foo<T> (); } public abstract class B : A { public override T Foo<T> () { return default (T); } } public class C : B { } -------- Actual Results: test.cs(16,14): error CS0534: `C' does not implement inherited abstract member `A.Foo<T>()' Expected Results: no CS0534 error (only "Main not found"). How often does this happen? consistently. Additional Information: - If the return type is changed from T to void (or whatever), this CS0534 does not happen. - If class B is not abstract, then CS0534 does not happen. - It is only about generic methods. The example code below compiles without problem, so it does not apply to generic type parameters. using System; public abstract class A<T> { public abstract T Foo (); } public abstract class B<T> : A<T> { public override T Foo () { return default (T); } } public class C<T> : B<T> { } ---- Additional Comments From martin@ximian.com 2006-03-09 07:34:36 MST ---- I have an idea about this one, will have a look at it tomorrow. ---- Additional Comments From martin@ximian.com 2006-03-12 15:13:52 MST ---- Fixed in SVN. Unknown operating system unknown. Setting to default OS "Other".