[Mono-bugs] [Bug 52705][Nor] New - CS0619 - ObsoleteAttribute on .ctor() is not considered

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 9 Jan 2004 09:47:34 -0500 (EST)


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 ginga@kit.hi-ho.ne.jp.

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

--- shadow/52705	2004-01-09 09:47:34.000000000 -0500
+++ shadow/52705.tmp.8977	2004-01-09 09:47:34.000000000 -0500
@@ -0,0 +1,45 @@
+Bug#: 52705
+Product: Mono/Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ginga@kit.hi-ho.ne.jp               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CS0619 - ObsoleteAttribute on .ctor() is not considered
+
+When compilers detects the usage of members which has an 
+ObsoleteAttribute , it should report warnings or errors.
+mcs looks to do it well for members, but not for constructors:
+
+using System;
+public class Test
+{
+	[Obsolete ("Causes an error")]
+	public Test () {}
+	public Test (bool flag) : this () {}
+	public static void Main () {}
+}
+
+mcs result:
+
+Compilation succeeded
+
+csc result:
+
+obsolete.cs(6,9): warning CS0618: 'Test.Test()' is obsolete: 'Causes an 
+error'
+
+How often does this happen? 
+Always
+
+(This bug passes System.Data.Common.DBDataPermission.cs, which uses 
+[ObsoleteAttribute ("...", true)] .)