[Mono-bugs] [Bug 69361][Nor] New - Internal protected properties cannot be overriden

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 11 Nov 2004 11:51:19 -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 lluis@ximian.com.

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

--- shadow/69361	2004-11-11 11:51:19.000000000 -0500
+++ shadow/69361.tmp.24436	2004-11-11 11:51:19.000000000 -0500
@@ -0,0 +1,44 @@
+Bug#: 69361
+Product: Mono: Compilers
+Version: 1.0
+OS: SUSE 9.1
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lluis@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Internal protected properties cannot be overriden
+
+Internal protected properties cannot be overriden. It works for methods.
+Test case:
+
+compile this in one assembly:
+
+public class AA
+{
+	internal protected virtual string Data {
+		get { return null; }
+	}
+}
+
+try to compile this class in another assembly, referencing the first one:
+
+public class BB : AA
+{
+	protected override string Data {
+		get { return null; }
+	}
+}
+
+I get:
+
+kk2.cs(4) error CS0507: 'BB.Data' can't change the access modifiers when
+overriding inherited member 'AA.Data'
+Compilation failed: 1 error(s), 0 warnings