[Mono-bugs] [Bug 47216][Wis] Changed - bogus warnings on subclasses overriding parent methods

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 31 Jul 2003 18:14:54 -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 orphennui@yahoo.com.

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

--- shadow/47216	Thu Jul 31 18:05:06 2003
+++ shadow/47216.tmp.26739	Thu Jul 31 18:14:54 2003
@@ -1,14 +1,14 @@
 Bug#: 47216
 Product: Mono/MCS
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: orphennui@yahoo.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -16,6 +16,31 @@
 Cc: 
 Summary: bogus warnings on subclasses overriding parent methods
 
 I get warnings about needing to use "new" on methods which have the same
 name but a different signature (argument list anyways, dunno about retval)
 than a method in their parent.  This seems incorrect.
+
+------- Additional Comments From orphennui@yahoo.com  2003-07-31 18:14 -------
+err, not a method in the parent, but a property in the parent....
+
+public class Foo {
+	public class Bar {
+		public int MyInt {
+			get { return 0; }
+		}
+	}
+
+	public class Bar2 : Bar {
+		public int MyInt(int foo) {
+			return foo;
+		}
+	}	
+
+	public static void Main ()
+	{
+		Bar2 b2 = new Bar2 ();
+		Console.WriteLine (b2.MyInt (1234));
+	}
+}
+
+