Bug 316004 (MONO65757) - [HEAD] mcs report invalid warning CS0672 for overridden member
Summary: [HEAD] mcs report invalid warning CS0672 for overridden member
Status: RESOLVED FIXED
Alias: MONO65757
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Linux
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-12 09:08 UTC by Gert Driesen
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:53:22 UTC


---- Reported by gert.driesen@pandora.be 2004-09-12 02:08:21 MST ----

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.



---- Additional Comments From marek.safar@seznam.cz 2004-09-13 17:49:45 MST ----

Fixed in CVS