[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / test-925.cs
blob5e9ececb61e4ab43d068bc3d0ac63e109baf2a8a
1 using System;
2 using System.Linq;
3 using System.Reflection;
5 class Program
7 public static int Main ()
9 var setter = typeof (MyClass).GetMember("set_Item")[0] as MethodInfo;
10 var sp = setter.GetParameters ();
11 var first = sp [0].GetCustomAttributes ();
12 var value = sp [2].GetCustomAttributes ();
14 if (first.Count () != 0)
15 return 1;
17 if (value.Count () != 1)
18 return 2;
20 return 0;
24 [AttributeUsage(AttributeTargets.All)]
25 public class MyAttribute2Attribute : Attribute
29 public class MyClass
31 public string this[int index1, int index2]
33 get
35 return "";
38 [param: MyAttribute2]
39 set