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; }
}
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>
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 {
// 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)