[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / dtest-037.cs
1 // Compiler options: -r:dtest-037-lib.dll
2
3 enum E
4 {
5         Value = 9
6 }
7
8 class C
9 {
10         public static int Main ()
11         {
12                 var t = new External ();
13
14                 t.DynamicProperty = "test";
15                 string s = t.DynamicProperty;
16                 if (s != "test")
17                         return 1;
18                 
19                 t.Field = 's';
20                 if (t.Field != 's')
21                         return 2;
22
23                 t.FieldArray = new dynamic [2,2];
24                 t.FieldArray [1,1] = 'b';
25                 if (t.FieldArray[1,1] != 'b')
26                         return 21;
27                 
28                 if (t.Method (E.Value) != E.Value)
29                         return 3;
30                 
31                 dynamic d;
32                 t.MethodOut (out d);
33                 if (d != decimal.MaxValue)
34                         return 4;
35
36                 I<dynamic>[] r = t.Method2 (1);
37                 int res = r [0].Value;
38                 r = t.Method3 (null);
39                 
40                 CI<dynamic> ci2 = new CI2 ();
41                 ci2.Value = 'v';
42                 if (ci2.Value != 'v')
43                         return 5;
44                 
45                 return 0;
46         }
47 }