X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fmethod.cs;h=d1e0b3e2b83027c080f3cd70b615ba25f28411b2;hb=0c56887d08d2f4a31145f116c21fb01fce246c51;hp=8df1be80a97852aef5909b2e0f42bf905035dd73;hpb=48992d4b3f8b568be17180372160d2f3e03b8ccb;p=mono.git diff --git a/mcs/mcs/method.cs b/mcs/mcs/method.cs index 8df1be80a97..d1e0b3e2b83 100644 --- a/mcs/mcs/method.cs +++ b/mcs/mcs/method.cs @@ -165,8 +165,9 @@ namespace Mono.CSharp { return s + parameters.GetSignatureForDocumentation (); } - public virtual void PrepareEmit () + public override void PrepareEmit () { + base.PrepareEmit (); parameters.ResolveDefaultValues (this); } @@ -1090,19 +1091,12 @@ namespace Mono.CSharp { } if (base_override.IsGeneric) { - ObsoleteAttribute oa; foreach (var base_tp in base_tparams) { - oa = base_tp.BaseType.GetAttributeObsolete (); - if (oa != null) { - AttributeTester.Report_ObsoleteMessage (oa, base_tp.BaseType.GetSignatureForError (), Location, Report); - } + base_tp.BaseType.CheckObsoleteness (this, Location); if (base_tp.InterfacesDefined != null) { foreach (var iface in base_tp.InterfacesDefined) { - oa = iface.GetAttributeObsolete (); - if (oa != null) { - AttributeTester.Report_ObsoleteMessage (oa, iface.GetSignatureForError (), Location, Report); - } + iface.CheckObsoleteness (this, Location); } } } @@ -1411,11 +1405,7 @@ namespace Mono.CSharp { p.Name = md_p.Name; p.DefaultValue = md_p.DefaultValue; if (md_p.OptAttributes != null) { - if (p.OptAttributes == null) { - p.OptAttributes = md_p.OptAttributes; - } else { - p.OptAttributes.Attrs.AddRange (md_p.OptAttributes.Attrs); - } + Attributes.AttachFromPartial (p, md_p); } } @@ -2658,7 +2648,7 @@ namespace Mono.CSharp { else if (OperatorType == OpType.Implicit) Parent.MemberCache.CheckExistingMembersOverloads (this, GetMetadataName (OpType.Explicit), parameters); - TypeSpec declaring_type = Parent.CurrentType; + TypeSpec declaring_type = Parent.PartialContainer.CurrentType; TypeSpec return_type = MemberType; TypeSpec first_arg_type = ParameterTypes [0];