2005-02-02 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Wed, 2 Feb 2005 12:10:15 +0000 (12:10 -0000)
committerMartin Baulig <martin@novell.com>
Wed, 2 Feb 2005 12:10:15 +0000 (12:10 -0000)
* delegate.cs (Delegate.DefineType): Report an internal error if
TypeManager.multicast_delegate_type is null.  See bug #72015 for
details.

svn path=/trunk/mcs/; revision=39979

mcs/mcs/ChangeLog
mcs/mcs/delegate.cs

index 9b8f6e42cfb590e29b0153517717db1a3f718314..925779b04063377c0eebbd8d02dfd2a2c8376ac4 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-02  Martin Baulig  <martin@ximian.com>
+
+       * delegate.cs (Delegate.DefineType): Report an internal error if
+       TypeManager.multicast_delegate_type is null.  See bug #72015 for
+       details.        
+
 2005-02-02  Raja R Harinath  <rharinath@novell.com>
 
        Fix a crasher in a variant of #31984.
index 84ecc3e68abb6154012563759dffb6a9236b1953..75a0989906ecb32bf4cbb46ae613d1e2cf3faea2 100644 (file)
@@ -84,6 +84,12 @@ namespace Mono.CSharp {
                        TypeAttributes attr = Modifiers.TypeAttr (ModFlags, IsTopLevel) |
                                TypeAttributes.Class | TypeAttributes.Sealed;
 
+                       if (TypeManager.multicast_delegate_type == null)
+                               Report.Error (-100, loc, "Internal error: delegate used before " +
+                                             "System.MulticastDelegate is resolved.  This can only " +
+                                             "happen during corlib compilation, when using a delegate " +
+                                             "in any of the `core' classes.  See bug #72015 for details.");
+
                        if (IsTopLevel) {
                                if (TypeManager.NamespaceClash (Name, Location))
                                        return null;