Put the merging back.
[mono.git] / mcs / gmcs / rootcontext.cs
index e30bfa3642a78e651d7fc1ec6d70f8cc580dee91..184fd139ca37c9f23518ebfd48d0b5b863307dbf 100755 (executable)
@@ -379,13 +379,15 @@ namespace Mono.CSharp {
                                "System.ParamArrayAttribute",
                                "System.CLSCompliantAttribute",
                                "System.Security.UnverifiableCodeAttribute",
+                               "System.Security.Permissions.SecurityAttribute",
                                "System.Runtime.CompilerServices.IndexerNameAttribute",
                                "System.Runtime.InteropServices.InAttribute",
                                "System.Runtime.InteropServices.StructLayoutAttribute",
                                "System.Runtime.InteropServices.FieldOffsetAttribute",
                                "System.InvalidOperationException",
                                "System.NotSupportedException",
-                               "System.MarshalByRefObject"
+                               "System.MarshalByRefObject",
+                               "System.Security.CodeAccessPermission"
                        };
 
                        // We must store them here before calling BootstrapCorlib_ResolveDelegate.
@@ -487,13 +489,13 @@ namespace Mono.CSharp {
                }
 
                static TypeExpr NamespaceLookup (DeclSpace ds, string name,
-                                                int num_type_args, bool silent, Location loc)
+                                                int num_type_args, Location loc)
                {
                        //
                        // Try in the current namespace and all its implicit parents
                        //
                        for (NamespaceEntry ns = ds.NamespaceEntry; ns != null; ns = ns.ImplicitParent) {
-                               IAlias result = ns.Lookup (ds, name, num_type_args, false, silent, loc);
+                               IAlias result = ns.Lookup (ds, name, num_type_args, false, loc);
 
                                if (result == null)
                                        continue;
@@ -545,6 +547,7 @@ namespace Mono.CSharp {
                                                //
                                                Type type = TypeManager.LookupType (current_type.FullName + "." + name);
                                                if (type != null){
+                                                       type = ds.ResolveNestedType (type, loc);
                                                        t = new TypeExpression (type, loc);
                                                        ds.Cache [name] = t;
                                                        return t;
@@ -556,7 +559,7 @@ namespace Mono.CSharp {
                                        containing_ds = containing_ds.Parent;
                                }
                                
-                               t = NamespaceLookup (ds, name, num_type_params, silent, loc);
+                               t = NamespaceLookup (ds, name, num_type_params, loc);
                                if (t != null){
                                        ds.Cache [name] = t;
                                        return t;
@@ -726,9 +729,6 @@ namespace Mono.CSharp {
                        }
 
                        if (type_container_resolve_order != null) {
-                               foreach (TypeContainer tc in type_container_resolve_order)
-                                       tc.EmitConstants ();
-                               
                                foreach (TypeContainer tc in type_container_resolve_order)
                                        tc.EmitType ();
                        }