[Mono-bugs] [Bug 28223][Nor] New - mcs does not warn when a method hides an inherited member

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
26 Jul 2002 03:09:27 -0000


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 murban@houston.rr.com.

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

--- shadow/28223	Thu Jul 25 23:09:27 2002
+++ shadow/28223.tmp.9551	Thu Jul 25 23:09:27 2002
@@ -0,0 +1,58 @@
+Bug#: 28223
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: SuSE 8.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: murban@houston.rr.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not warn when a method hides an inherited member
+
+Description of Problem:  
+  
+mcs does not warn when a method in a derived class hides an inherited  
+member without the new of 'new'.  
+  
+  
+Steps to reproduce the problem:  
+  
+Compile this example:  
+  
+class Base  
+{  
+	public void F() {}  
+}  
+  
+class Derived: Base  
+{  
+	public void F() {}  
+}  
+  
+  
+public class Test  
+{  
+	public static void Main()  
+	{}  
+}  
+  
+Actual Results:  
+ 
+mcs reports "Compilation successful" with no warnings. 
+  
+  
+Expected Results:  
+  
+mcs reports "check-hiding.cs:8: declaration of `F' hides an inherited 
+member, and `new' was not present" 
+ 
+How often does this happen?   
+  
+Every time