//
void PopulateMethod (TypeContainer parent, DeclSpace decl_space, InterfaceMethod im)
{
- Type return_type = this.ResolveType (im.ReturnType, false, im.Location);
+ Type return_type = im.ReturnType.Type;
+ if (return_type == null)
+ return_type = this.ResolveType (im.ReturnType, false, im.Location);
+
Type [] arg_types = im.ParameterTypes (this);
MethodBuilder mb;
Parameter [] p;
return_type, arg_types);
InternalParameters ip = new InternalParameters (arg_types, im.Parameters);
-
+
if (!RegisterMethod (mb, ip, arg_types)) {
Error111 (im);
return;
return_type, ModFlags, false);
if (im.OptAttributes != null)
- Attribute.ApplyAttributes (ec, mb, im, im.OptAttributes, Location);
+ Attribute.ApplyAttributes (ec, mb, im, im.OptAttributes);
}
//
PropertyBuilder pb;
MethodBuilder get = null, set = null;
ip.Type = this.ResolveTypeExpr (ip.Type, false, ip.Location);
+ if (ip.Type == null)
+ return;
+
Type prop_type = ip.Type.Type;
Type [] setter_args = new Type [1];
null, ModFlags, false);
if (ip.OptAttributes != null)
- Attribute.ApplyAttributes (ec, pb, ip, ip.OptAttributes, Location);
+ Attribute.ApplyAttributes (ec, pb, ip, ip.OptAttributes);
TypeManager.RegisterProperty (pb, get, set);
property_builders.Add (pb);
MyEventBuilder eb;
MethodBuilder add = null, remove = null;
ie.Type = this.ResolveTypeExpr (ie.Type, false, ie.Location);
+ if (ie.Type == null)
+ return;
+
Type event_type = ie.Type.Type;
if (event_type == null)
Type [] parameters = new Type [1];
parameters [0] = event_type;
- eb = new MyEventBuilder (TypeBuilder, ie.Name,
+ eb = new MyEventBuilder (null, TypeBuilder, ie.Name,
EventAttributes.None, event_type);
//
if (ie.OptAttributes != null)
- Attribute.ApplyAttributes (ec, eb, ie, ie.OptAttributes, Location);
+ Attribute.ApplyAttributes (ec, eb, ie, ie.OptAttributes);
TypeManager.RegisterEvent (eb, add, remove);
event_builders.Add (eb);
{
PropertyBuilder pb;
ii.Type = this.ResolveTypeExpr (ii.Type, false, ii.Location);
+ if (ii.Type == null)
+ return;
+
Type prop_type = ii.Type.Type;
Type [] arg_types = ii.ParameterTypes (this);
Type [] value_arg_types;
}
if (ii.OptAttributes != null)
- Attribute.ApplyAttributes (ec, pb, ii, ii.OptAttributes, Location);
+ Attribute.ApplyAttributes (ec, pb, ii, ii.OptAttributes);
property_builders.Add (pb);
}
/// </summary>
public override bool DefineMembers (TypeContainer parent)
{
+ if (members_defined)
+ return true;
+
if (!SemanticAnalysis ())
return false;
+
if (defined_method != null){
foreach (InterfaceMethod im in defined_method)
PopulateMethod (parent, this, im);
if (OptAttributes != null) {
EmitContext ec = new EmitContext (parent, this, Location, null, null,
ModFlags, false);
- Attribute.ApplyAttributes (ec, TypeBuilder, this, OptAttributes, Location);
+ Attribute.ApplyAttributes (ec, TypeBuilder, this, OptAttributes);
}
return true;
}
public class InterfaceMethod : InterfaceMemberBase {
- public readonly Expression ReturnType;
+ public Expression ReturnType;
public readonly Parameters Parameters;
public readonly Location Location;
/// </summary>
public string GetSignature (DeclSpace ds)
{
- Type ret = ds.ResolveType (ReturnType, false, Location);
+ ReturnType = ds.ResolveTypeExpr (ReturnType, false, Location);
+ if (ReturnType == null)
+ return null;
+
+ Type ret = ReturnType.Type;
string args = Parameters.GetSignature (ds);
if ((ret == null) || (args == null))