Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=77674

--- shadow/77674        2006-03-01 02:24:38.000000000 -0500
+++ shadow/77674.tmp.28207      2006-03-01 02:24:38.000000000 -0500
@@ -0,0 +1,83 @@
+Bug#: 77674
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] incorrect CS0534: gmcs fails to resolve generic method that 
returns generic argument in abstract class
+
+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>
+{
+}
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to