[Mono-bugs] [Bug 76382][Nor] New - [GMCS] differentiate generic arguments on method return types

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Oct 9 04:25:17 EDT 2005


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 atsushi at ximian.com.

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

--- shadow/76382	2005-10-09 04:25:17.000000000 -0400
+++ shadow/76382.tmp.11953	2005-10-09 04:25:17.000000000 -0400
@@ -0,0 +1,53 @@
+Bug#: 76382
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] differentiate generic arguments on method return types
+
+gmcs cannot differentiate such methods that have the same args, same type
+body name, but have diffrent generic arguments on the return type.
+
+--------
+public interface Ret {}
+public interface Ret<T> {}
+
+public abstract class BaseClass
+{
+        public virtual Ret Foo () { return null; }
+        public virtual Ret<T> Foo<T> () { return null; }
+}
+
+public class DerivedClass : BaseClass
+{
+        public override Ret Foo () { return null; }
+        public override Ret<T> Foo<T> () { return null; }
+}
+
+
+Actual Results:
+
+overload-override.cs(12,22): error CS0508: `DerivedClass.Foo()': return
+type must be `Ret<T>' to match overridden member `BaseClass.Foo()'
+overload-override.cs(7,26):: `BaseClass.Foo()', name of symbol related to
+previous error
+Compilation failed: 1 error(s), 0 warnings
+
+Expected Results:
+
+no error (except for entrypoint not found).
+
+How often does this happen? 
+
+consistently.


More information about the mono-bugs mailing list