2005-06-29 Jonathan Chambers <jonathan.chambers@ansys.com>
[mcs.git] / tests / test-349.cs
blobe894690a3be35d5d025124f4a690d8c1f8533be8
1 // Compiler options: -optimize+
3 // TODO: I will have to investigate how to test that instance ctor is really empty
4 // GetMethodBody in 2.0
6 using System;
7 using System.Reflection;
9 class C {
10 public C () {}
12 int i = new int ();
13 int i2 = 1 - 1;
14 double d = new double ();
15 char c = new char ();
16 bool b = new bool ();
17 decimal dec2 = new decimal ();
18 object o = null;
19 ValueType BoolVal = (ValueType)null;
21 int[] a_i = null;
22 object[] a_o = null;
23 ValueType[] a_v = null;
26 class X
28 public delegate void D();
29 public static event D Ev1 = null;
30 public static event D Ev2 = null;
31 protected static string temp = null, real_temp = null;
34 class X2
36 static int i = 5;
40 class Test
42 static int a = b = 5;
43 static int b = 0;
45 static int Main ()
47 if (a != 5 || b != 0)
48 return 1;
50 if ((typeof (X2).Attributes & TypeAttributes.BeforeFieldInit) == 0)
51 return 2;
53 Console.WriteLine ("OK");
54 return 0;