Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-349.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0e3b29ffa48be8b6a755b11561b63b588e737e15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// 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;
	}
}