[Mono-bugs] [Bug 74905][Nor] New - gmcs does not allow delegate inheritance in generic classes
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 11 May 2005 04:14:40 -0400 (EDT)
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 dsilva@ccs.neu.edu.
http://bugzilla.ximian.com/show_bug.cgi?id=74905
--- shadow/74905 2005-05-11 04:14:40.000000000 -0400
+++ shadow/74905.tmp.23087 2005-05-11 04:14:40.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 74905
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: dsilva@ccs.neu.edu
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: gmcs does not allow delegate inheritance in generic classes
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+The Processing function type is public and should be inherited here:
+
+ public abstract class List <T> {
+ public delegate void Processing(T obj);
+
+ public abstract void each(Processing f);
+ }
+
+ public class Nil<T> : List<T> {
+ public static Nil<T> nil = new Nil<T>();
+ private Nil() {}
+
+ public override void each(Processing f) {}
+ }
+
+but gmcs signals a strangely-worded error:
+
+$ gmcs -target:library Test.cs
+Test.cs(12) error CS0505: 'Nil`1.each(List`1.Processing)': cannot override
+because 'List`1.each' is not a method
+Test.cs(5): 'List`1.each(List`1.Processing)' (name of symbol related to
+previous error
+Compilation failed: 1 error(s), 0 warnings