2007-03-06 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Tue, 6 Mar 2007 13:33:56 +0000 (13:33 -0000)
committerZoltan Varga <vargaz@gmail.com>
Tue, 6 Mar 2007 13:33:56 +0000 (13:33 -0000)
* Type.cs (Equals): Remove a useless check.

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

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

index 5316ec8cc9a3178c5a9f2951911a4eb099cc3ed0..f6fd4ce4fc8364b1dca5788c3763f0212dfe3078 100644 (file)
@@ -1,5 +1,7 @@
 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
 
+       * Type.cs (Equals): Remove a useless check.
+       
        * Type.cs: Rename Type:Equals(Type) to EqualsInternal, and add support for checking
        UnderlyingSystemType. Fixes #81037.
 
index 681c0c2acde707082d4992dbe187ac36f772f656..251f05225e620f444f3ff06ee618582df80825c9 100644 (file)
@@ -421,11 +421,7 @@ namespace System {
                }
 
                public bool Equals (Type type) {
-                       // Avoid recursion
-                       if (Object.ReferenceEquals (UnderlyingSystemType, this))
-                               return EqualsInternal (type.UnderlyingSystemType);
-                       else
-                               return UnderlyingSystemType.EqualsInternal (type.UnderlyingSystemType);
+                       return UnderlyingSystemType.EqualsInternal (type.UnderlyingSystemType);
                }
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]