}
public class ParamsParameter : Parameter {
+
+ bool ParamsAttributeEmit;
+
public ParamsParameter (FullNamedExpression type, string name, Attributes attrs, Location loc):
base (type, name, Parameter.Modifier.PARAMS, attrs, loc)
{
return null;
}
+ var mc = ec as MemberCore;
+ ParamsAttributeEmit = mc == null || (mc.ModFlags & Modifiers.OVERRIDE) == 0;
+
return parameter_type;
}
public override void ApplyAttributes (MethodBuilder mb, ConstructorBuilder cb, int index, PredefinedAttributes pa)
{
base.ApplyAttributes (mb, cb, index, pa);
- pa.ParamArray.EmitAttribute (builder);
+
+ if (ParamsAttributeEmit)
+ pa.ParamArray.EmitAttribute (builder);
}
}
--- /dev/null
+public abstract class A
+{
+ public abstract void Bind (string [] args);
+}
+
+public class B : A
+{
+ public override void Bind (params string [] args)
+ {
+ }
+
+ public static int Main ()
+ {
+ var m = typeof (B).GetMethod ("Bind");
+ var p = m.GetParameters ();
+ var ca = p[0].GetCustomAttributes (false);
+ if (ca.Length != 0)
+ return 1;
+
+ return 0;
+ }
+}
</method>
</type>
</test>
+ <test name="test-945.cs">
+ <type name="A">
+ <method name="Void Bind(System.String[])" attrs="1478">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor()" attrs="6276">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="B">
+ <method name="Void Bind(System.String[])" attrs="198">
+ <size>2</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>63</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-95.cs">
<type name="X">
<method name="Int32 Main()" attrs="150">