[runtime] Avoid indirection when building MonoContext on darwin
[mono.git] / mcs / tests / test-349.cs
1 // Compiler options: -optimize+
2
3 using System;
4 using System.Reflection;
5
6 enum E
7 {
8 }
9
10 delegate void D();
11                 
12 class C {
13         public C () {}
14
15         int i = new int ();
16         int i2 = 1 - 1;
17         double d = new double ();
18         char c = new char ();
19         bool b = new bool ();
20         decimal dec2 = new decimal ();
21         object o = null;
22         ValueType BoolVal = (ValueType)null;
23         E e = new E ();
24         event D Ev1 = null;
25                 
26         int[] a_i = null;
27         object[] a_o = null;
28         ValueType[] a_v = null;
29 }
30
31 class X
32 {
33         public static event D Ev1 = null;
34         public static event D Ev2 = null;
35         protected static string temp = null, real_temp = null;
36 }
37         
38 class X2 
39 {
40         static int i = 5;
41 }
42         
43
44 class Test
45 {
46         static int a = b = 5;
47         static int b = 0;
48                 
49         public static int Main ()
50         {
51                 if (a != 5 || b != 0)
52                         return 1;
53                         
54                 if ((typeof (X2).Attributes & TypeAttributes.BeforeFieldInit) == 0)
55                         return 2;
56                 
57                 Console.WriteLine ("OK");
58                 return 0;
59         }
60 }