Author: zoltan
Date: 2005-05-26 09:18:46 -0400 (Thu, 26 May 2005)
New Revision: 45044

Modified:
   trunk/mcs/class/corlib/System/ChangeLog
   trunk/mcs/class/corlib/System/Type.cs
Log:
2005-05-26  Zoltan Varga  <[EMAIL PROTECTED]>

        * Type.cs (IsEnum): Special case EnumBuilder here.


Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog     2005-05-26 13:11:33 UTC (rev 
45043)
+++ trunk/mcs/class/corlib/System/ChangeLog     2005-05-26 13:18:46 UTC (rev 
45044)
@@ -1,3 +1,7 @@
+2005-05-26  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * Type.cs (IsEnum): Special case EnumBuilder here.
+
 2005-05-26  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * MonoType.cs: Changed call from GetName to UnprotectedGetName to

Modified: trunk/mcs/class/corlib/System/Type.cs
===================================================================
--- trunk/mcs/class/corlib/System/Type.cs       2005-05-26 13:11:33 UTC (rev 
45043)
+++ trunk/mcs/class/corlib/System/Type.cs       2005-05-26 13:18:46 UTC (rev 
45044)
@@ -230,6 +230,10 @@
 
                public bool IsEnum {
                        get {
+                               // This hack is needed because EnumBuilder's 
UnderlyingSystemType returns the enum's basetype
+                               if (this is EnumBuilder)
+                                       return true;
+
                                return is_subtype_of (this, typeof 
(System.Enum), false) &&
                                        this != typeof (System.Enum);
                        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to