[Mono-bugs] [Bug 65757][Nor] New - [HEAD] mcs report invalid warning CS0672 for overridden member
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 12 Sep 2004 02:08:21 -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 gert.driesen@pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=65757
--- shadow/65757 2004-09-12 02:08:21.000000000 -0400
+++ shadow/65757.tmp.30224 2004-09-12 02:08:21.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 65757
+Product: Mono: Compilers
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gert.driesen@pandora.be
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [HEAD] mcs report invalid warning CS0672 for overridden member
+
+There's a regression in CVS HEAD with regards to CS0672 :
+
+When a member is marked obsolete in both the base type and a deriving
+type, mcs still reports CS0672.
+
+To reproduce this issue, compile the following code snippet (using
+mcs /target:library) :
+
+using System;
+
+public class A {
+ [Obsolete()]
+ public virtual string Warning {
+ get { return ""; }
+ }
+}
+
+public class B : A {
+ [Obsolete()]
+ public override string Warning {
+ get { return ""; }
+ }
+}
+
+When using CVS HEAD, the following warning is reported (although
+B.Warning is actually marked obsolete):
+
+test.cs(12) warning CS0672: Member 'B.Warning' overrides obsolete member.
+Add the Obsolete attribute to 'B.Warning'
+test.cs(6): 'get_Warning' (name of symbol related to previous warning)
+Compilation succeeded - 1 warning(s)
+
+This code fragment compiles without warnings on mono built from the mono-
+1-0 branch and csc.