Jo Shields 3c1f479b9d Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
2015-04-07 09:35:12 +01:00

61 lines
879 B
C#

// Compiler options: -optimize+
using System;
using System.Reflection;
enum E
{
}
delegate void D();
class C {
public C () {}
int i = new int ();
int i2 = 1 - 1;
double d = new double ();
char c = new char ();
bool b = new bool ();
decimal dec2 = new decimal ();
object o = null;
ValueType BoolVal = (ValueType)null;
E e = new E ();
event D Ev1 = null;
int[] a_i = null;
object[] a_o = null;
ValueType[] a_v = null;
}
class X
{
public static event D Ev1 = null;
public static event D Ev2 = null;
protected static string temp = null, real_temp = null;
}
class X2
{
static int i = 5;
}
class Test
{
static int a = b = 5;
static int b = 0;
public static int Main ()
{
if (a != 5 || b != 0)
return 1;
if ((typeof (X2).Attributes & TypeAttributes.BeforeFieldInit) == 0)
return 2;
Console.WriteLine ("OK");
return 0;
}
}