[Mono-bugs] [Bug 52458][Wis] Changed - Scope problem when overriding private method in nested type
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 22 Dec 2003 16:07:34 -0500 (EST)
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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=52458
--- shadow/52458 2003-12-22 16:00:06.000000000 -0500
+++ shadow/52458.tmp.9955 2003-12-22 16:07:34.000000000 -0500
@@ -1,14 +1,14 @@
Bug#: 52458
Product: Mono/Compilers
Version: unspecified
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: C#
AssignedTo: mono-bugs@ximian.com
ReportedBy: bmaurer@users.sf.net
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -44,6 +44,35 @@
t.cs(14,23): error CS0506: 'B.C.Blah()' : cannot override inherited member
'B.Blah()' because it is not marked virtual, abstract, or override
t.cs(10,10): (Location of symbol related to previous error)
t.cs(14,23): error CS0507: 'B.C.Blah()': cannot change access modifiers
when overriding 'private' inherited member 'B.Blah()'t.cs(10,10): (Location
of symbol related to previous error)
+
+------- Additional Comments From bmaurer@users.sf.net 2003-12-22 16:07 -------
+Related:
+
+We compile
+
+using System;
+
+class A {
+ public virtual int Blah () { return 1; }
+}
+
+class B : A {
+ new public static int Blah () { return 0; }
+
+ class C : B {
+
+ public override int Blah () { return 2; }
+ static void Main () {
+ Console.WriteLine (new C ().Blah ());
+ }
+ }
+}
+
+csc gives
+
+t.cs(12) error CS0506: `B.C.Blah': cannot override inherited member
+`B.Blah' because it is not virtual, abstract or override
+