manually synchronized with 56802
[mono.git] / mcs / gmcs / decl.cs
index 43f467c85f9aaa1d430afa07823b9c93775dd1b2..dcd451b96f94b5aaef3ca8b55d97bafd624e29c4 100644 (file)
@@ -410,10 +410,6 @@ namespace Mono.CSharp {
                        get { return Parent.EmitContext; }
                }
 
-               public bool InUnsafe {
-                       get { return ((ModFlags & Modifiers.UNSAFE) != 0) || Parent.UnsafeContext; }
-               }
-
                public virtual bool IsUsed {
                        get { return (caching_flags & Flags.IsUsed) != 0; }
                }
@@ -423,24 +419,6 @@ namespace Mono.CSharp {
                        caching_flags |= Flags.IsUsed;
                }
 
-               // 
-               // Whehter is it ok to use an unsafe pointer in this type container
-               //
-               public bool UnsafeOK (DeclSpace parent)
-               {
-                       //
-                       // First check if this MemberCore modifier flags has unsafe set
-                       //
-                       if ((ModFlags & Modifiers.UNSAFE) != 0)
-                               return true;
-
-                       if (parent.UnsafeContext)
-                               return true;
-
-                       Expression.UnsafeError (Location);
-                       return false;
-               }
-
                /// <summary>
                /// Returns instance of ObsoleteAttribute for this MemberCore
                /// </summary>
@@ -869,19 +847,6 @@ namespace Mono.CSharp {
                        return Name;
                }
 
-               //
-               // Whether this is an `unsafe context'
-               //
-               public bool UnsafeContext {
-                       get {
-                               if ((ModFlags & Modifiers.UNSAFE) != 0)
-                                       return true;
-                               if (Parent != null)
-                                       return Parent.UnsafeContext;
-                               return false;
-                       }
-               }
-
                EmitContext type_resolve_ec;
                protected EmitContext TypeResolveEmitContext {
                        get {
@@ -903,13 +868,11 @@ namespace Mono.CSharp {
                //    Resolves the expression `e' for a type, and will recursively define
                //    types.  This should only be used for resolving base types.
                // </summary>
-               protected TypeExpr ResolveBaseTypeExpr (Expression e, bool silent, Location loc)
+               protected TypeExpr ResolveBaseTypeExpr (Expression e)
                {
-                       TypeResolveEmitContext.loc = loc;
-                       TypeResolveEmitContext.ResolvingTypeTree = true;
                        if (this is GenericMethod)
                                TypeResolveEmitContext.ContainerType = Parent.TypeBuilder;
-                       return e.ResolveAsTypeTerminal (TypeResolveEmitContext, silent);
+                       return e.ResolveAsTypeTerminal (TypeResolveEmitContext, false);
                }
                
                public bool CheckAccessLevel (Type check_type)