"disable_omit_fp" can now be included in MONO_DEBUG
[mono-project.git] / mcs / tests / gtest-584.cs
blobbc66d3dad63fe1e2747001c8e9c4af87747def1f
1 using System;
3 enum E : sbyte
5 V = 1
8 struct S
10 public static bool operator == (S s, S i)
12 throw new ApplicationException ();
15 public static bool operator != (S s, S i)
17 throw new ApplicationException ();
20 public static implicit operator int? (S s)
22 throw new ApplicationException ();
25 public static implicit operator E? (S s)
27 return null;
31 class C
33 public static int Main ()
35 E? a = E.V;
36 E? a_n = null;
37 E? b = E.V;
38 E? b_n = null;
40 if (a != b)
41 return 1;
43 if (a == a_n)
44 return 2;
46 if (a_n != b_n)
47 return 3;
49 E e = (E) 4;
50 S s;
51 if (e == s)
52 return 10;
54 if (s == e)
55 return 11;
57 if (e > s)
58 return 12;
60 if (s > e)
61 return 13;
63 if ((s & e) != null)
64 return 14;
66 if ((s & e) != null)
67 return 15;
69 var res1 = (E?) 1 == null;
70 if (res1)
71 return 16;
73 var res2 = null == (E?) 1;
74 if (res2)
75 return 17;
77 var r1 = a_n & E.V;
78 if (r1 != null)
79 return 18;
81 var r2 = E.V & a_n;
82 if (r2 != null)
83 return 19;
85 Console.WriteLine ("ok");
87 return 0;