[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / test-partial-26.cs
1 using System;
2
3 namespace TestAttributesCollecting
4 {
5         class A : Attribute
6         {
7         }
8
9         public partial class X
10         {
11                 [A]
12                 partial void Foo<[A] T>(/*[A]*/ int p);
13         }
14
15         public partial class X
16         {
17                 partial void Foo<T> (int p)
18                 {
19                         int i;
20                 }
21         }
22
23         public partial class Y
24         {
25                 partial void Foo ()
26                 {
27                         int i;
28                 }
29         }
30
31         public partial class Y
32         {
33                 [CLSCompliant (true)]
34                 partial void Foo ();
35         }
36
37         class Program
38         {
39                 public static int Main ()
40                 {
41                         var m = typeof (X).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
42                         var x = m.GetCustomAttributes (true);
43                         Console.WriteLine (x.Length);
44                         if (x.Length != 1)
45                                 return 1;
46
47                         var ga = m.GetGenericArguments ();
48                         x = ga [0].GetCustomAttributes (false);
49                         if (x.Length != 1)
50                                 return 2;
51
52                         x = typeof (Y).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetCustomAttributes (true);
53                         Console.WriteLine (x.Length);
54                         if (x.Length != 1)
55                                 return 3;
56
57                         return 0;
58                 }
59         }
60 }