Rework gc descriptor to include size information in more cases.
[mono.git] / mcs / mcs / roottypes.cs
index df7962043c9088089aa24c0c70a8e059e3384662..48f2b266b3b7637a15fdbf0c15a8dfebc27f70c6 100644 (file)
@@ -8,6 +8,7 @@
 //
 // Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
 // Copyright 2003-2008 Novell, Inc.
+// Copyright 2011 Xamarin Inc
 //
 
 using System;
@@ -366,7 +367,7 @@ namespace Mono.CSharp
                public RootNamespace CreateRootNamespace (string alias)
                {
                        if (alias == global_ns.Alias) {
-                               NamespaceContainer.Error_GlobalNamespaceRedefined (Location.Null, Report);
+                               RootNamespace.Error_GlobalNamespaceRedefined (Report, Location.Null);
                                return global_ns;
                        }
 
@@ -399,8 +400,13 @@ namespace Mono.CSharp
 
                public new void Define ()
                {
-                       foreach (TypeContainer tc in types)
-                               tc.DefineType ();
+                       foreach (TypeContainer tc in types) {
+                               try {
+                                       tc.DefineType ();
+                               } catch (Exception e) {
+                                       throw new InternalErrorException (tc, e);
+                               }
+                       }
 
                        foreach (TypeContainer tc in types)
                                tc.ResolveTypeParameters ();
@@ -608,7 +614,7 @@ namespace Mono.CSharp
                        return PartialContainer.IsClsComplianceRequired ();
                }
 
-               public override IList<MethodSpec> LookupExtensionMethod (TypeSpec extensionType, string name, int arity, ref NamespaceContainer scope)
+               public override ExtensionMethodCandidates LookupExtensionMethod (TypeSpec extensionType, string name, int arity)
                {
                        return null;
                }