Take stars out of types where they make more sense.
[mono-project.git] / mcs / tests / gtest-289.cs
blob96304364b52f75621a5500ebbe5d31f0905b1805
1 // Compiler options: -optimize+
3 using System;
4 using System.Reflection;
6 enum E
10 delegate void D();
12 class C {
13 public C () {}
15 int i = default (int);
16 double d = default (double);
17 char c = default (char);
18 bool b = default (bool);
19 decimal dec2 = default (decimal);
20 object o = default (object);
21 ValueType BoolVal = default (ValueType);
22 E e = default (E);
24 int[] a_i = default(int[]);
25 object[] a_o = default(object[]);
26 ValueType[] a_v = default(ValueType[]);
28 event D Ev1 = default(D);
31 class Consts
33 const int i = default (int);
34 const double d = default (double);
35 const char c = default (char);
36 const bool b = default (bool);
37 const decimal dec2 = default (decimal);
38 const object o = default (object);
39 const ValueType BoolVal = default (ValueType);
40 const E e = default (E);
42 const int[] a_i = default(int[]);
43 const object[] a_o = default(object[]);
44 const ValueType[] a_v = default(ValueType[]);
47 class Test
49 public static int Main ()
51 ConstructorInfo mi = typeof(C).GetConstructors ()[0];
52 MethodBody mb = mi.GetMethodBody();
54 if (mb.GetILAsByteArray ().Length != 7) {
55 Console.WriteLine("Optimization failed");
56 return 3;
59 bool b = default (DateTime?) == default (DateTime?);
60 if (!b)
61 return 19;
63 Console.WriteLine ("OK");
64 return 0;