[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / test-101.cs
1 using System;
2 using System.Reflection;
3
4 namespace Test {
5         
6         public class MyAttribute: Attribute {
7                 public string val;
8                 public MyAttribute (string stuff) {
9                         System.Console.WriteLine (stuff);
10                         val = stuff;
11                 }
12         }
13         
14         public class My2Attribute: MyAttribute {
15                 public int ival;
16                 public My2Attribute (string stuff, int blah) : base (stuff) {
17                         System.Console.WriteLine ("ctor with int val"+stuff);
18                         ival = blah;
19                 }
20         }
21
22         [Flags, ]
23         enum X {
24                 A, B
25         }
26         
27         [My("testclass")]
28         [My2("testclass", 22)]
29         public class Test {
30                 public static int Main() {
31                         System.Reflection.MemberInfo info = typeof (Test);
32                         object[] attributes = info.GetCustomAttributes (false);
33                         for (int i = 0; i < attributes.Length; i ++) {
34                                 System.Console.WriteLine(attributes[i]);
35                         }
36                         if (attributes.Length != 2)
37                                 return 1;
38                         MyAttribute attr = (MyAttribute) attributes [0];
39                         if (attr.val != "testclass")
40                                 return 2;
41                         return 0;
42                 }
43         }
44 }