2007-07-10 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Mon, 9 Jul 2007 13:11:57 +0000 (13:11 -0000)
committerZoltan Varga <vargaz@gmail.com>
Mon, 9 Jul 2007 13:11:57 +0000 (13:11 -0000)
* RuntimeTypeHandle.cs: Fix signatures of == and != operators.

svn path=/trunk/mcs/; revision=81638

mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/RuntimeTypeHandle.cs

index c10ebdf3cc086ab9fc3e25cd44c9cfbefab398be..76bb897773137d54b40ef074564c343ef00a0e26 100644 (file)
@@ -1,5 +1,7 @@
 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
 
+       * RuntimeTypeHandle.cs: Fix signatures of == and != operators.
+
        * ModuleHandle.cs: Add missing 2.0 stuff.
 
 2007-07-08  Zoltan Varga  <vargaz@gmail.com>
index 3875173e2fb8e0ce9bea9dd6a8246bb95c964091..f4f8721541d8046ccd0c19d1459e1ed6df27a45b 100644 (file)
@@ -100,14 +100,14 @@ namespace System
                        return value.GetHashCode ();
                }
 
-               public static bool operator == (RuntimeTypeHandle left, RuntimeTypeHandle right)
+               public static bool operator == (RuntimeTypeHandle left, Object right)
                {
-                       return left.Equals (right);
+                       return (right != null) && (right is RuntimeTypeHandle) && left.Equals ((RuntimeTypeHandle)right);
                }
 
-               public static bool operator != (RuntimeTypeHandle left, RuntimeTypeHandle right)
+               public static bool operator != (RuntimeTypeHandle left, Object right)
                {
-                       return !left.Equals (right);
+                       return (right == null) || !(right is RuntimeTypeHandle) || !left.Equals ((RuntimeTypeHandle)right);
                }
 
                public static bool operator == (Object left, RuntimeTypeHandle right)