}
TypeExpr ct = new ConstructedType (ctype, new_args, loc);
- if (ct.ResolveAsTypeTerminal (ec) == null)
+ if (ct.ResolveAsTypeStep (ec) == null)
return false;
ctype = ct.Type;
}
ArrayList list = new ArrayList ();
if (at.IsGenericInstance)
list.Add (at);
- else {
- for (Type bt = at.BaseType; bt != null; bt = bt.BaseType)
- list.Add (bt);
+ for (Type bt = at.BaseType; bt != null; bt = bt.BaseType)
+ list.Add (bt);
- list.AddRange (TypeManager.GetInterfaces (at));
- }
+ list.AddRange (TypeManager.GetInterfaces (at));
bool found_one = false;
param_types [i] = pd.ParameterType (i);
Argument a = (Argument) arguments [i];
- if ((a.Expr is NullLiteral) || (a.Expr is MethodGroupExpr))
+ if ((a.Expr is NullLiteral) || (a.Expr is MethodGroupExpr) ||
+ (a.Expr is AnonymousMethod))
continue;
arg_types [i] = a.Type;
if (unwrap != null) {
unwrap.EmitCheck (ec);
ig.Emit (OpCodes.Brfalse, is_null_label);
- }
- left.Emit (ec);
- ig.Emit (OpCodes.Br, end_label);
+ left.Emit (ec);
+ ig.Emit (OpCodes.Br, end_label);
- ig.MarkLabel (is_null_label);
- expr.Emit (ec);
+ ig.MarkLabel (is_null_label);
+ expr.Emit (ec);
- ig.MarkLabel (end_label);
+ ig.MarkLabel (end_label);
+ } else {
+ left.Emit (ec);
+ ig.Emit (OpCodes.Dup);
+ ig.Emit (OpCodes.Brtrue, end_label);
+
+ ig.MarkLabel (is_null_label);
+
+ ig.Emit (OpCodes.Pop);
+ expr.Emit (ec);
+
+ ig.MarkLabel (end_label);
+ }
}
}