[Mono-bugs] [Bug 68738][Nor] New - new keyword on property is broken

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 24 Oct 2004 18:36:46 -0400 (EDT)


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 jluke@cfl.rr.com.

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

--- shadow/68738	2004-10-24 18:36:46.000000000 -0400
+++ shadow/68738.tmp.11243	2004-10-24 18:36:46.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 68738
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jluke@cfl.rr.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: new keyword on property is broken
+
+When compiling a program like:
+using System;
+
+class Base
+{
+        public int Test {
+                get {
+                        return 0;
+                }
+        }
+}
+
+class Subclass : Base
+{
+        static void Main () {}
+
+        public new int Test {
+                set {
+                }
+        }
+}
+
+monop then reports:
+internal class Subclass : Base {
+    public Subclass ();
+
+    public virtual bool Equals (object o);
+    public virtual int GetHashCode ();
+    public Type GetType ();
+    public virtual string ToString ();
+
+    public int Test {
+        get;
+    }
+    public int Test {
+        set;
+    }
+}
+
+which is obviously an error that two properties are available.
+
+Gtk.Menu.Screen is an example.
+./NotificationAreaIcon.cs(193) error CS0154: The property `Screen' can not
+be used in this context because it lacks a get accessor