X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fgmcs%2Fgeneric.cs;h=5406444662418957cd26daa44c1cf61fbe3ca863;hb=1733851d28faad34184ad6cbf25992e33f483e44;hp=68926e2391c22a1ceb5cc4ee66852af35eeb2cb8;hpb=2a8259225695032220537b3c90a99d7a2686f214;p=mono.git diff --git a/mcs/gmcs/generic.cs b/mcs/gmcs/generic.cs index 68926e2391c..54064446624 100644 --- a/mcs/gmcs/generic.cs +++ b/mcs/gmcs/generic.cs @@ -1165,7 +1165,7 @@ namespace Mono.CSharp { } TypeExpr ct = new ConstructedType (ctype, new_args, loc); - if (ct.ResolveAsTypeTerminal (ec) == null) + if (ct.ResolveAsTypeStep (ec) == null) return false; ctype = ct.Type; } @@ -1997,12 +1997,10 @@ namespace Mono.CSharp { 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; @@ -2179,7 +2177,8 @@ namespace Mono.CSharp { 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; @@ -2950,15 +2949,26 @@ namespace Mono.CSharp { 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); + } } }