[Mono-bugs] [Bug 61902][Nor] New - Invalid warning CS0618 when invoking obsolete ctor from other ctor
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 24 Jul 2004 03:30:13 -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=61902
--- shadow/61902 2004-07-24 03:30:13.000000000 -0400
+++ shadow/61902.tmp.3554 2004-07-24 03:30:13.000000000 -0400
@@ -0,0 +1,42 @@
+Bug#: 61902
+Product: Mono: Compilers
+Version: unspecified
+OS:
+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: Invalid warning CS0618 when invoking obsolete ctor from other ctor
+
+When invoking an obsolete ctor from another ctor in the class, mcs
+reports CS0618, while csc (1.0 -> 2.0) does not.
+
+using System;
+
+public class Test {
+ [Obsolete("doesn't matter")]
+ public Test() : this("layout", false)
+ {
+ }
+
+ [Obsolete("doesn't matter")]
+ public Test(string a, bool writeToErrorStream)
+ {
+ }
+}
+
+Compiling this code using mcs will result in the following warning :
+
+test.cs(5) warning CS0618: 'Test.Test(string, bool)' is
+obsolete: 'doesn't matter'
+Compilation succeeded - 1 warning(s)
+
+Compiling the same code using csc does not report any warnings.