[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / dtest-037.cs
blobb1485bd745d23a4e65a48fdc0c164d138119c9f5
1 // Compiler options: -r:dtest-037-lib.dll
3 enum E
5 Value = 9
8 class C
10 public static int Main ()
12 var t = new External ();
14 t.DynamicProperty = "test";
15 string s = t.DynamicProperty;
16 if (s != "test")
17 return 1;
19 t.Field = 's';
20 if (t.Field != 's')
21 return 2;
23 t.FieldArray = new dynamic [2,2];
24 t.FieldArray [1,1] = 'b';
25 if (t.FieldArray[1,1] != 'b')
26 return 21;
28 if (t.Method (E.Value) != E.Value)
29 return 3;
31 dynamic d;
32 t.MethodOut (out d);
33 if (d != decimal.MaxValue)
34 return 4;
36 I<dynamic>[] r = t.Method2 (1);
37 int res = r [0].Value;
38 r = t.Method3 (null);
40 CI<dynamic> ci2 = new CI2 ();
41 ci2.Value = 'v';
42 if (ci2.Value != 'v')
43 return 5;
45 return 0;