public bool AddToMemberContainer (MemberCore symbol)
{
- return AddToContainer (symbol, symbol.Name);
+ return AddToContainer (symbol, symbol.MemberName.MethodName);
}
protected virtual bool AddToTypeContainer (DeclSpace ds)
methods.Add (method);
}
+ //
+ // Do not use this method: use AddMethod.
+ //
+ // This is only used by iterators.
+ //
+ public void AppendMethod (Method method)
+ {
+ if (!AddToMemberContainer (method))
+ return;
+
+ if (methods == null)
+ methods = new MethodArrayList (this);
+
+ methods.Add (method);
+ }
+
public void AddConstructor (Constructor c)
{
if (c.Name != MemberName.Name) {
if (default_static_constructor != null)
default_static_constructor.Emit ();
- if (methods != null)
+ if (methods != null){
foreach (Method m in methods)
m.Emit ();
+ }
if (operators != null)
foreach (Operator o in operators)
else
accmods = Modifiers.PRIVATE;
+ // FIXME: remove this nasty fix for bug #77370 when
+ // we get good AllowModifiersProp implementation.
+ if ((mod & Modifiers.STATIC) != 0) {
+ AllowedModifiers |= Modifiers.STATIC;
+ AllowedModifiers &= ~ (Modifiers.ABSTRACT | Modifiers.SEALED);
+ }
+
this.ModFlags = Modifiers.Check (AllowedModifiers, mod, accmods, Location);
this.OriginalModFlags = mod;
}
RetType = ret_type;
if (parameters == null)
- Parameters = TypeManager.NoTypes;
+ Parameters = Type.EmptyTypes;
else
Parameters = parameters;
}