2003-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 25 Mar 2003 02:48:08 +0000 (02:48 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 25 Mar 2003 02:48:08 +0000 (02:48 -0000)
* Type.cs: fixed bug #40123.

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

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

index 0b87627c226fadcc01b6e85a39a0afc0c8b6d5d9..1a9889af233f7336312a1a921e266e1d9d0b7c6a 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Type.cs: fixed bug #40123.
+
 2003-03-22  Pedro Martínez Juliá  <yoros@wanadoo.es>
 
        * FloatingPointFormatter.cs: Fixed some bugs for get the same
index 7a12578503eff8f4f58cc9a8a9c7fc70a2c317a4..2f41ed37fe4dee7025000f9721f3d5758f91b7a6 100644 (file)
@@ -541,10 +541,9 @@ namespace System {
                }
 
                public virtual bool IsInstanceOfType (object o) {
-                       if (o != null) {
-                               Type t = o.GetType ();
-                               return (t == this) || t.IsSubclassOf (this);
-                       }
+                       if (o != null)
+                               return IsAssignableFrom (o.GetType ());
+
                        return false;
                }