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 [EMAIL PROTECTED]

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

--- shadow/76849        2005-12-02 10:57:43.000000000 -0500
+++ shadow/76849.tmp.13351      2005-12-02 12:06:52.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: [EMAIL PROTECTED]                            
 ReportedBy: [EMAIL PROTECTED]               
 QAContact: [EMAIL PROTECTED]
@@ -215,6 +215,51 @@
                }
        }
 
 
 ------- Additional Comments From [EMAIL PROTECTED]  2005-12-02 10:57 -------
 Fixed in SVN.
+
+------- Additional Comments From [EMAIL PROTECTED]  2005-12-02 12:06 -------
+Static constructors of [Obsolete(IsError=true)] types should be able
+to reference & create instance of other [Obsolete(IsError=true)]
+types.  (The actual rules may be more lax, but this is my test case.)
+
+The following compiles with CSC and fails with mcs:
+
+       using System;
+       using System.Runtime.InteropServices;
+
+       [Obsolete ("Use Native.CdeclFunction", true)]
+       public class CdeclFunction {
+               public CdeclFunction (string s, string s2)
+               {
+               }
+
+               public object Invoke (object[] arguments)
+               {
+                       return null;
+               }
+       }
+
+       [Obsolete ("Use Native.XPrintfFunctions", true)]
+       internal class XPrintfFunctions 
+       {
+               internal delegate object XPrintf (object[] arguments);
+
+               internal static XPrintf printf;
+
+               static XPrintfFunctions ()
+               {
+                       CdeclFunction f = new CdeclFunction ("libc", "printf");
+                       printf = new XPrintf (f.Invoke);
+               }
+       }
+
+       class Test {
+               public static void Main ()
+               {
+               }
+       }
+
+BTW, thank you for the quick turnaround on all this.  I owe you a
+beverage of your choice if we ever meet.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to