[tuner] handle the case with multiple "preserve" attributes
[mono-project.git] / mcs / tests / gtest-523.cs
blob7840a15b4e3d5ab51a671e52ff5e539d9dbedc04
1 using System;
2 using System.Collections.Generic;
4 namespace Test
6 internal struct TestClass4<T> : IEquatable<TestClass4<T>>, IEquatable<T>, IEqualityComparer<TestClass4<T>> where T : class
8 public bool Equals (T obj)
10 return true;
13 public bool Equals (TestClass4<T> entry)
15 return true;
18 public bool Equals (TestClass4<T> x, TestClass4<T> y)
20 return x.Equals (y);
23 public int GetHashCode (TestClass4<T> obj)
25 return obj.GetHashCode ();
28 public override int GetHashCode ()
30 return 1;
33 public override bool Equals (object obj)
35 return false;
38 public static bool operator == (TestClass4<T> entry1, TestClass4<T> entry2)
40 return entry1.Equals (entry2);
43 public static bool operator == (T entry1, TestClass4<T> entry2)
45 return entry2.Equals (entry1);
48 public static bool operator == (TestClass4<T> entry1, T entry2)
50 return entry1.Equals (entry2);
53 public static bool operator == (object entry1, TestClass4<T> entry2)
55 return entry2.Equals (entry1);
58 public static bool operator == (TestClass4<T> entry1, object entry2)
60 return entry1.Equals (entry2);
63 public static bool operator != (TestClass4<T> entry1, TestClass4<T> entry2)
65 return !(entry1 == entry2);
68 public static bool operator != (T entry1, TestClass4<T> entry2)
70 return !(entry1 == entry2);
73 public static bool operator != (TestClass4<T> entry1, T entry2)
75 return !(entry1 == entry2);
78 public static bool operator != (object entry1, TestClass4<T> entry2)
80 return !(entry1 == entry2);
83 public static bool operator != (TestClass4<T> entry1, object entry2)
85 return !(entry1 == entry2);
89 class C
91 public static void Main ()
93 new TestClass4<string> ();