[Mono-bugs] [Bug 76849][Wis] Changed - Can't compile assembly that uses [Obsolete(IsError=true)]-marked types

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Dec 5 08:39:17 EST 2005


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 jonpryor at vt.edu.

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

--- shadow/76849	2005-12-05 08:06:03.000000000 -0500
+++ shadow/76849.tmp.22671	2005-12-05 08:39:17.000000000 -0500
@@ -1,13 +1,13 @@
 Bug#: 76849
 Product: Mono: Compilers
 Version: 1.1
 OS: other
 OS Details: 
-Status: RESOLVED   
-Resolution: FIXED
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Wishlist
 Component: C#
 AssignedTo: marek.safar at seznam.cz                            
 ReportedBy: jonpryor at vt.edu               
 QAContact: mono-bugs at ximian.com
@@ -268,6 +268,36 @@
 The patch introduced a build regression, am reverting it for now:
 
 make btest in mcs/mcs fails to bootstrap
 
 ------- Additional Comments From marek.safar at seznam.cz  2005-12-05 08:06 -------
 Fixed in SVN.
+
+------- Additional Comments From jonpryor at vt.edu  2005-12-05 08:39 -------
+mcs doesn't like it when you try to assign `readonly static' members
+within the declaration.  mcs likes it if you instead assign the
+`readonly static' within a static constructor.
+
+The following compiles with CSC.EXE and fails with mcs:
+
+	using System;
+	using System.Runtime.InteropServices;
+
+	[Obsolete ("Use Native.SignalHandler", true)]
+	public delegate void SignalHandler (int signal);
+
+	[Obsolete ("Use Native.Stdlib", true)]
+	public class Stdlib {
+		public static readonly SignalHandler SIG_DFL = new SignalHandler
+(Default);
+
+		private static void Default (int signal)
+		{
+		}
+	}
+
+	class Test {
+		public static void Main ()
+		{
+		}
+	}
+


More information about the mono-bugs mailing list