[Mono-bugs] [Bug 77849][Nor] New - mcs fails to compile class with
method get_X when base class has property X
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sun Mar 19 05:11:46 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 marek.safar at seznam.cz.
http://bugzilla.ximian.com/show_bug.cgi?id=77849
--- shadow/77849 2006-03-19 05:11:46.000000000 -0500
+++ shadow/77849.tmp.25578 2006-03-19 05:11:46.000000000 -0500
@@ -0,0 +1,73 @@
+Bug#: 77849
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: marek.safar at seznam.cz
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs fails to compile class with method get_X when base class has property X
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1.
+
+class BaseClass {
+ protected virtual int Value {
+ get {
+ return 0;
+ }
+ set { }
+ }
+}
+
+abstract class DerivedClass: BaseClass {
+ protected int get_Value () {
+ return 1;
+ }
+}
+
+
+class ErrorClass: DerivedClass {
+ protected override int Value {
+ get {
+ return 0;
+ }
+ set { }
+ }
+
+ static void Main () {}
+}
+
+
+Actual Results:
+
+test-X.cs(13,23): warning CS0114: `DerivedClass.get_Value()' hides
+inherited member `BaseClass.Value'. To make the current member override
+that implementation, add the override keyword. Otherwise add the new keyword
+test-X.cs(5,17):: `BaseClass.Value.get', name of symbol related to previous
+warning
+test-X.cs(13,23): error CS0115: `DerivedClass.get_Value()': no suitable
+method found to override
+
+Expected Results:
+
+No error/warning.
+
+
+How often does this happen?
+
+
+Additional Information:
More information about the mono-bugs
mailing list