[Mono-bugs] [Bug 77543][Nor] New - compiler generates error when using protected setters with abstract base class

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Feb 13 12:54:44 EST 2006


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 jresnick at gmail.com.

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

--- shadow/77543	2006-02-13 12:54:44.000000000 -0500
+++ shadow/77543.tmp.853	2006-02-13 12:54:44.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 77543
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: jresnick at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: compiler generates error when using protected setters with abstract base class
+
+Description of Problem:
+
+The following code is legal and should compile, but the compiler generates
+an error which prevents compilation:
+
+namespace ProtectedSetter
+{
+	public abstract class BaseClass
+	{
+		public abstract string Name { get; protected set;}
+	}
+
+	public class DerivedClass : BaseClass
+	{
+		
+		public override String Name
+		{
+			get {
+				// TODO
+				return null;
+			}
+			protected set {
+				// TODO
+			}
+		}
+		
+		
+	}
+}
+
+The compiler (version 1.1.13.2) generates the following error:
+
+error CS0277: Accessor `ProtectedSetter.DerivedClass.Name.set' must be
+declared public to implement interface member
+`ProtectedSetter.BaseClass.Name.set'


More information about the mono-bugs mailing list