Fix LLVM linker flags for 6.0.
[mono-project.git] / mcs / tests / gtest-383.cs
blob4706ec63d43ce0656bb4a4e93f90fa4a087d9413
1 using System;
3 struct MyTypeA
5 short b;
7 public MyTypeA (short b)
9 this.b = b;
12 public static MyTypeA operator + (MyTypeA a, MyTypeA b)
14 throw new NotSupportedException ();
17 public static bool operator == (MyTypeA a, MyTypeA b)
19 return true;
22 public static bool operator != (MyTypeA a, MyTypeA b)
24 throw new NotSupportedException ();
27 public static bool operator > (MyTypeA a, MyTypeA b)
29 throw new NotSupportedException ();
32 public static bool operator < (MyTypeA a, MyTypeA b)
34 throw new NotSupportedException ();
38 struct MyTypeB
40 short b;
42 public MyTypeB (short b)
44 this.b = b;
47 public static MyTypeB operator + (MyTypeB a, MyTypeB b)
49 return a;
52 public static bool operator == (MyTypeB a, MyTypeB b)
54 return true;
57 public static bool operator != (MyTypeB a, MyTypeB b)
59 return false;
62 public static bool operator > (MyTypeB a, MyTypeB b)
64 return false;
67 public static bool operator < (MyTypeB a, MyTypeB b)
69 return true;
72 public static MyTypeB operator & (MyTypeB a, MyTypeB b)
74 return a;
78 class C
80 public static int Main ()
82 MyTypeA? mt = null;
83 mt = null + mt;
85 MyTypeA? mt2 = null;
86 mt2 = mt2 + null;
87 bool b = mt2 > null;
88 bool x = mt2 == null;
90 MyTypeB? bt = null;
91 bt = bt + bt;
92 if (bt != null)
93 return 2;
95 MyTypeB? b2 = null;
96 bool bb = b2 == b2;
97 if (!bb)
98 return 3;
100 MyTypeB? b3 = null;
101 b3 = b3 & b3;
102 return 0;