[Mono-bugs] [Bug 22665] New - Can't override a protected abstract method.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
28 Mar 2002 03:19:54 -0000


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 dihlewis@yahoo.co.uk.

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

--- shadow/22665	Wed Mar 27 22:19:54 2002
+++ shadow/22665.tmp.26298	Wed Mar 27 22:19:54 2002
@@ -0,0 +1,35 @@
+Bug#: 22665
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dihlewis@yahoo.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Can't override a protected abstract method.
+
+Protected is a valid modifier for abstract methods, but the code below 
+fails to compile: "B does not implement inherited abstract member B.Foo".
+
+
+
+abstract class A {
+        protected abstract void Foo ();
+}
+
+class B : A {
+        protected override void Foo () { }
+}
+
+class Test {
+        public static void Main () {
+        }
+}